Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-17805

sqlContext.read.text() does not work with a list of paths

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.2, 2.1.0
    • Component/s: PySpark
    • Labels:
      None

      Description

      When I try to load multiple text files with the sqlContext, I get the
      following error:

      spark-2.0.0-bin-hadoop2.4/python/lib/pyspark.zip/pyspark/sql/readwriter.py",
      line 282, in text
      UnboundLocalError: local variable 'path' referenced before assignment

      According to the code
      (https://github.com/apache/spark/blob/master/python/pyspark/sql/readwriter.py#L291),
      the variable 'path' is not set if the argument is not a string.

      Laurent

        Attachments

          Activity

            People

            • Assignee:
              bryanc Bryan Cutler
              Reporter:
              laurent-l Laurent Legrand
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: