[ https://issues.apache.org/jira/browse/AIRFLOW-4801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16867745#comment-16867745 ]
Rinat Abdullin commented on AIRFLOW-4801: ----------------------------------------- I have encountered the same issue today. Airflow properly detects and loads packaged DAGs (as per [documentation|[https://airflow.apache.org/concepts.html#packaged-dags]). T|https://airflow.apache.org/concepts.html#packaged-dags]),]riggering the DAG run throws up an exception with the same error message and stack trace. > trigger dag got when dag is zipped > ----------------------------------- > > Key: AIRFLOW-4801 > URL: https://issues.apache.org/jira/browse/AIRFLOW-4801 > Project: Apache Airflow > Issue Type: Bug > Components: DagRun > Affects Versions: 1.10.3 > Reporter: kasim > Priority: Major > > I have dags.zip like below : > > {code:java} > Archive: dags.zip > extracting: jobs.zip > extracting: libs.zip > inflating: log4j.properties > inflating: main.py # spark-summit python file > creating: resources/ > creating: resources/result/ > creating: resources/train/ > inflating: resources/train/sale_count.parquet > inflating: resources/words.txt > inflating: salecount.py # a dag contain SparkSubmitOperator > inflating: test.py # very simple one as airflow example > {code} > > Always got error when click `trigger dag test.py` > > {code:java} > ____/ ( ( ) ) \___ > /( ( ( ) _ )) ) )\ > (( ( )( ) ) ( ) ) > ((/ ( _( ) ( _) ) ( () ) ) > ( ( ( (_) (( ( ) .((_ ) . )_ > ( ( ) ( ( ) ) ) . ) ( ) > ( ( ( ( ) ( _ ( _) ). ) . ) ) ( ) > ( ( ( ) ( ) ( )) ) _)( ) ) ) > ( ( ( \ ) ( (_ ( ) ( ) ) ) ) )) ( ) > ( ( ( ( (_ ( ) ( _ ) ) ( ) ) ) > ( ( ( ( ( ) (_ ) ) ) _) ) _( ( ) > (( ( )( ( _ ) _) _(_ ( (_ ) > (_((__(_(__(( ( ( | ) ) ) )_))__))_)___) > ((__) \\||lll|l||/// \_)) > ( /(/ ( ) ) )\ ) > ( ( ( ( | | ) ) )\ ) > ( /(| / ( )) ) ) )) ) > ( ( ((((_(|)_))))) ) > ( ||\(|(|)|/|| ) > ( |(||(||)|||| ) > ( //|/l|||)|\\ \ ) > (/ / // /|//||||\\ \ \ \ _) > ------------------------------------------------------------------------------- > Node: dc09 > ------------------------------------------------------------------------------- > Traceback (most recent call last): > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask/app.py", line > 2311, in wsgi_app > response = self.full_dispatch_request() > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask/app.py", line > 1834, in full_dispatch_request > rv = self.handle_user_exception(e) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask/app.py", line > 1737, in handle_user_exception > reraise(exc_type, exc_value, tb) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask/_compat.py", > line 36, in reraise > raise value > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask/app.py", line > 1832, in full_dispatch_request > rv = self.dispatch_request() > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask/app.py", line > 1818, in dispatch_request > return self.view_functions[rule.endpoint](**req.view_args) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask_admin/base.py", > line 69, in inner > return self._run_view(f, *args, **kwargs) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask_admin/base.py", > line 368, in _run_view > return fn(self, *args, **kwargs) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/flask_login/utils.py", > line 258, in decorated_view > return func(*args, **kwargs) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/airflow/www/utils.py", > line 275, in wrapper > return f(*args, **kwargs) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/airflow/www/utils.py", > line 322, in wrapper > return f(*args, **kwargs) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/airflow/utils/db.py", > line 73, in wrapper > return func(*args, **kwargs) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/airflow/www/views.py", > line 1138, in trigger > external_trigger=True > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/airflow/utils/db.py", > line 73, in wrapper > return func(*args, **kwargs) > File > "/opt/anaconda3/envs/airflow/lib/python3.6/site-packages/airflow/models/__init__.py", > line 2925, in create_dagrun > return self.get_dag().create_dagrun(run_id=run_id, > AttributeError: 'NoneType' object has no attribute 'create_dagrun' > {code} > If I extracted test.py and delete dags.zip , `trigger dag test.py` would be > fine . > If I extract all file in dags.zip and delete dags.zip , `trigger dag > test.py` got wrong too . > > > > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)