uranusjr commented on code in PR #39270:
URL: https://github.com/apache/airflow/pull/39270#discussion_r1580686884
##########
airflow/operators/python.py:
##########
@@ -350,6 +343,36 @@ def get_tasks_to_skip():
return condition
+def _load_pickle():
+ import pickle
+
+ return pickle
+
+
+def _load_dill():
+ try:
+ import dill
+ except ImportError:
+ raise AirflowException("Unable to import 'dill' make sure that it
installed.")
Review Comment:
Honestly if the user can’t search for the error message and click the first
StackOverflow link I think all help is beyond them, and the additional
exception makes the vast majority of people parse through additional noise to
find out what the actual problem is.
If you really insist this would help, at least only catch
ModuleNotFoundError instead of ImportError. It is still not worth it IMO, but
at least you wouldn’t provide false information when the import fails with
another reason.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]