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:40:19 UTC
[GitHub] [spark] johnhany97 commented on a change in pull request #31902: [SPARK-34803][PYSPARK] Pass the raised ImportError if pandas or pyarrow fail to import
johnhany97 commented on a change in pull request #31902:
URL: https://github.com/apache/spark/pull/31902#discussion_r598157264
##########
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:
Addressed in https://github.com/apache/spark/pull/31902/commits/30542f345f739a63c67c876b4b87f7a0240f228e
##########
File path: python/pyspark/sql/pandas/utils.py
##########
@@ -47,11 +49,13 @@ def require_minimum_pyarrow_version():
try:
import pyarrow
have_arrow = True
- except ImportError:
+ except ImportError as error:
have_arrow = False
+ raised_error = error
if not have_arrow:
raise ImportError("PyArrow >= %s must be installed; however, "
- "it was not found." % minimum_pyarrow_version)
+ "it was not found or an error was thrown by pyarrow"
Review comment:
Addressed in https://github.com/apache/spark/pull/31902/commits/30542f345f739a63c67c876b4b87f7a0240f228e
--
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