You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jack (JIRA)" <ji...@apache.org> on 2018/08/21 12:05:00 UTC

[jira] [Commented] (AIRFLOW-2746) UI shows error while there is no error.

    [ https://issues.apache.org/jira/browse/AIRFLOW-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587334#comment-16587334 ] 

jack commented on AIRFLOW-2746:
-------------------------------

My issue could be related to: https://issues.apache.org/jira/projects/AIRFLOW/issues/AIRFLOW-417

> UI shows error while there is no error.
> ---------------------------------------
>
>                 Key: AIRFLOW-2746
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2746
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: core
>            Reporter: jack
>            Priority: Major
>             Fix For: 2.0.0, 1.10
>
>
> When creating a new DAG with 
> {code:java}
> {{ next_execution_date }}
> {code}
>  the UI shows the following error:
> {code:java}
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
>     response = self.full_dispatch_request()
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
>     rv = self.handle_user_exception(e)
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
>     reraise(exc_type, exc_value, tb)
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
>     rv = self.dispatch_request()
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
>     return self.view_functions[rule.endpoint](**req.view_args)
>   File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 69, in inner
>     return self._run_view(f, *args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 368, in _run_view
>     return fn(self, *args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 755, in decorated_view
>     return func(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 356, in view_func
>     return f(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 262, in wrapper
>     return f(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 1154, in tree
>     base_date = dag.latest_execution_date or datetime.utcnow()
> AttributeError: 'NoneType' object has no attribute 'latest_execution_date'
> {code}
> This isn't a real error. waiting +- 5 minutes and refreshing the UI the error is gone. It seems like the UI isn't synced with creation of objects in the DB?
> The DAG code is:
> {code:java}
> args = {
>     'owner': Airflow
>     'start_date': datetime(2018, 07, 10),
>     'retries': 3,
>     'retry_delay': timedelta(minutes=10)
> }
> dag = DAG(
>     dag_id='import_orders',
>     default_args=args,
>     schedule_interval='0 15 * * *',
>     max_active_runs=1,
>     catchup=True
> )
> dag.doc_md = """\
>     #Title:
>     my comment
>     """
> start_task = DummyOperator(task_id='start_task', dag=dag)
> t = BashOperator(
>     task_id='import_orders',
>     bash_command="""python /home/ubuntu/airflow/importorders.py '{{ next_execution_date }}' """,
>     dag=dag)
> t.set_upstream(start_task)
> {code}



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