airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shubham (JIRA)" <>
Subject [jira] [Created] (AIRFLOW-432) Failure in importing DAG
Date Tue, 16 Aug 2016 15:56:20 GMT
Shubham created AIRFLOW-432:

             Summary: Failure in importing DAG
                 Key: AIRFLOW-432
             Project: Apache Airflow
          Issue Type: Bug
          Components: DagRun
            Reporter: Shubham


I have a simple DAG file

from airflow import DAG

#Dag for bulk decline of leads
provider_bulk_decline_dag = DAG('provider_bulk_decline_dag', default_args=dashboard_args,
schedule_interval='30 1,13 * * *')

#Dag for wake up IVE
wakeup_ivr_dag = DAG('wakeup_ivr_dag', default_args=dashboard_args, schedule_interval='00
3 * * *')

#Dag for monetization automatic refund
monetization_refund_dag = DAG('monetization_refund_dag', default_args=dashboard_args, schedule_interval='10
17 * * *')

#Dag for monetization automatic refund
edit_history_dag = DAG('edit_history_dag', default_args=dashboard_args, schedule_interval='30
18 * * *')

My operator file looks like this:

from airflow import DAG
from dags import dashboard_hourly_dag
from dags import credit_sms_dag
from dags import hourly_dag
from dags import daily_sms_dag
from dags import edit_history_dag
from airflow.operators import BashOperator, DummyOperator, PythonOperator, BranchPythonOperator

editHistoryReportTask = PythonOperator(
    op_kwargs={'env': 'PROD'},

But when I start the webserver, it keeps on giving me this error:

Broken DAG: [/home/ubuntu/airflow/] cannot import name edit_history_dag
While the command aiflow list_dags displays the above dag.

The error in log file is:

ERROR - Failed to import: /home/ubuntu/airflow/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/airflow/", line 247, in process_file
    m = imp.load_source(mod_name, filepath)
  File "/home/ubuntu/airflow/", line 6, in <module>
    from dags import edit_history_dag
ImportError: cannot import name edit_history_dag

Please help with the issue coz it reoccurs whenever I add a new dag.

This message was sent by Atlassian JIRA

View raw message