You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Seacen Zhao (JIRA)" <ji...@apache.org> on 2019/01/08 08:18:00 UTC

[jira] [Created] (AIRFLOW-3651) email.py will break import airflow

Seacen Zhao created AIRFLOW-3651:
------------------------------------

             Summary: email.py will break import airflow
                 Key: AIRFLOW-3651
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3651
             Project: Apache Airflow
          Issue Type: Bug
    Affects Versions: 1.10.1
            Reporter: Seacen Zhao


Test scenario:
 # create email.py empty file in $AIRFLOW_HOME/dags/ folder
 # run python in $AIRFLOW_HOME/dags/ folder
 # execute *import airflow*
 # Encounter below error:

>>> import airflow
No handlers could be found for logger "airflow.logging_config"
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib/python2.7/site-packages/airflow/__init__.py", line 36, in <module>
 from airflow import settings
 File "/usr/lib/python2.7/site-packages/airflow/settings.py", line 259, in <module>
 configure_logging()
 File "/usr/lib/python2.7/site-packages/airflow/logging_config.py", line 72, in configure_logging
 raise e
ValueError: Unable to configure handler 'task': Cannot resolve 'airflow.utils.log.file_task_handler.FileTaskHandler': cannot import name DAG

 

Note that even after email.py is removed from the folder, the problem still exists. Can only disappear by deleting the dags folder completely and re-create it.

 

This issue would impact testing of dag script.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)