Taragolis commented on code in PR #39270:
URL: https://github.com/apache/airflow/pull/39270#discussion_r1580742279


##########
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:
   > and the additional exception makes the vast majority of people parse 
through additional noise to find out what the actual problem is.
   
   I can't agree with you that it noise. Because exception says which is 
directly cause an error, an it is in the top of stactrace. But maybe it is 
personal and depend on how someone interpolate stacktraces and read them 
   
   > If you really insist this would help, at least only catch 
ModuleNotFoundError instead of ImportError.
   
   Let's switch to the `ModuleNotFoundError` but what we should do in the other 
10-100 cases when we do the same things in Airflow/Providers codebase?



-- 
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]

Reply via email to