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

Python type errors should print type, not object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0
    • 1.4.0
    • MLlib, PySpark
    • None

    Description

      In MLlib PySpark, we sometimes test the type of an object and print an error if the object is of the wrong type. E.g.:
      https://github.com/apache/spark/blob/f084c5de14eb10a6aba82a39e03e7877926ebb9e/python/pyspark/mllib/regression.py#L173

      These checks should print the type, not the actual object. E.g., if the object cannot be converted to a string, then the check linked above will give a warning like this:

      TypeError: not all arguments converted during string formatting
      

      ...which is weird for the user.

      There may be other places in the codebase where this is an issue, so we need to check through and verify.

      Attachments

        Activity

          People

            31z4 Elisey Zanko
            josephkb Joseph K. Bradley
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: