You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/20 20:26:21 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #31902: [SPARK-34803][PYSPARK] Pass the raised ImportError if pandas or pyarrow fail to import

dongjoon-hyun commented on a change in pull request #31902:
URL: https://github.com/apache/spark/pull/31902#discussion_r598155857



##########
File path: python/pyspark/sql/pandas/utils.py
##########
@@ -26,11 +26,13 @@ def require_minimum_pandas_version():
     try:
         import pandas
         have_pandas = True
-    except ImportError:
+    except ImportError as error:
         have_pandas = False
+        raised_error = error
     if not have_pandas:
         raise ImportError("Pandas >= %s must be installed; however, "
-                          "it was not found." % minimum_pandas_version)
+                          "it was not found or an error was thrown by pandas"

Review comment:
       It seems that we need an addition space at the end of this string. `pandas"` -> `pandas "`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org