chinhngt commented on issue #4389: [AIRFLOW-3583] Fix AirflowException import
URL: 
https://github.com/apache/incubator-airflow/pull/4389#issuecomment-450495458
 
 
   @jgao54 Thanks for taking a look. I must missed something then. Below is the 
exception I got when turning remote logging to wasb on:
   
   webserver_1  | Unable to load the config, contains a configuration error.
   webserver_1  | Traceback (most recent call last):
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 382, in 
resolve
   webserver_1  |     found = getattr(found, frag)
   webserver_1  | AttributeError: module 'airflow.utils.log' has no attribute 
'wasb_task_handler'
   webserver_1  | 
   webserver_1  | During handling of the above exception, another exception 
occurred:
   webserver_1  | 
   webserver_1  | Traceback (most recent call last):
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 384, in 
resolve
   webserver_1  |     self.importer(used)
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/utils/log/wasb_task_handler.py",
 line 23, in <module>
   webserver_1  |     from airflow.contrib.hooks.wasb_hook import WasbHook
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/contrib/hooks/wasb_hook.py", 
line 21, in <module>
   webserver_1  |     from airflow import AirflowException
   webserver_1  | ImportError: cannot import name 'AirflowException'
   webserver_1  | 
   webserver_1  | The above exception was the direct cause of the following 
exception:
   webserver_1  | 
   webserver_1  | Traceback (most recent call last):
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 558, in 
configure
   webserver_1  |     handler = self.configure_handler(handlers[name])
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 708, in 
configure_handler
   webserver_1  |     klass = self.resolve(cname)
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 391, in 
resolve
   webserver_1  |     raise v
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 384, in 
resolve
   webserver_1  |     self.importer(used)
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/utils/log/wasb_task_handler.py",
 line 23, in <module>
   webserver_1  |     from airflow.contrib.hooks.wasb_hook import WasbHook
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/contrib/hooks/wasb_hook.py", 
line 21, in <module>
   webserver_1  |     from airflow import AirflowException
   webserver_1  | ValueError: Cannot resolve 
'airflow.utils.log.wasb_task_handler.WasbTaskHandler': cannot import name 
'AirflowException'
   webserver_1  | 
   webserver_1  | During handling of the above exception, another exception 
occurred:
   webserver_1  | 
   webserver_1  | Traceback (most recent call last):
   webserver_1  |   File "/usr/local/bin/airflow", line 21, in <module>
   webserver_1  |     from airflow import configuration
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/__init__.py", line 36, in 
<module>
   webserver_1  |     from airflow import settings
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/settings.py", line 259, in 
<module>
   webserver_1  |     configure_logging()
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/logging_config.py", line 72, in 
configure_logging
   webserver_1  |     raise e
   webserver_1  |   File 
"/usr/local/lib/python3.5/dist-packages/airflow/logging_config.py", line 67, in 
configure_logging
   webserver_1  |     dictConfig(logging_config)
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 795, in 
dictConfig
   webserver_1  |     dictConfigClass(config).configure()
   webserver_1  |   File "/usr/lib/python3.5/logging/config.py", line 566, in 
configure
   webserver_1  |     '%r: %s' % (name, e))
   webserver_1  | ValueError: Unable to configure handler 'processor': Cannot 
resolve 'airflow.utils.log.wasb_task_handler.WasbTaskHandler': cannot import 
name 'AirflowException'
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to