turbaszek opened a new issue #11060:
URL: https://github.com/apache/airflow/issues/11060


   **Apache Airflow version**:
   
   Master branch.
   
   **Environment**:
   ```
   ./breeze --python 3.7 --backend postgres --db-reset  restart
   ```
   
   **What happened**:
   
   Webserver returned this error:
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in 
wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in 
full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in 
handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, 
in reraise
       raise value
     File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in 
full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in 
dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/opt/airflow/airflow/www/decorators.py", line 126, in wrapper
       return f(self, *args, **kwargs)
     File 
"/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py",
 line 109, in wraps
       return f(self, *args, **kwargs)
     File "/opt/airflow/airflow/www/decorators.py", line 61, in wrapper
       return f(*args, **kwargs)
     File "/opt/airflow/airflow/utils/session.py", line 65, in wrapper
       return func(*args, **kwargs)
     File "/opt/airflow/airflow/www/views.py", line 2119, in refresh
       dag = current_app.dag_bag.get_dag(dag_id)
     File "/opt/airflow/airflow/models/dagbag.py", line 191, in get_dag
       is_expired = (orm_dag.last_expired and dag.last_loaded < 
orm_dag.last_expired)
   AttributeError: 'NoneType' object has no attribute 'last_loaded'
   ```
   
   **What you expected to happen**:
   
   To see no error but DAG view.
   
   **How to reproduce it**:
   ```shell
   ./breeze --python 3.7 --backend postgres --db-reset  restart
   # then
   export AIRFLOW__CORE__DAGS_FOLDER=airflow/providers/google/cloud/example_dags
   airflow scheduler -D
   airflow webserver -w 1 -D
   ```
   
   Create a user, go to webserver, turn on `example_gcp_dataproc` and trigger 
it.
   After few seconds you should see a nuclear cloud under this address: 
`http://0.0.0.0:28080/refresh?dag_id=example_gcp_dataproc`
   
   **Anything else we need to know**:
   
   N/A
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to