rishabh9999 opened a new issue #15229:
URL: https://github.com/apache/airflow/issues/15229


   Python version: 3.6.12
   Airflow version: 2.0.1
   Node: sandbox-hdp.hortonworks.com
   
-------------------------------------------------------------------------------
   Traceback (most recent call last):
     File "/root/airflow/venv/lib64/python3.6/site-packages/flask/app.py", line 
2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/root/airflow/venv/lib64/python3.6/site-packages/flask/app.py", line 
1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/root/airflow/venv/lib64/python3.6/site-packages/flask/app.py", line 
1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/root/airflow/venv/lib64/python3.6/site-packages/flask/_compat.py", 
line 39, in reraise
       raise value
     File "/root/airflow/venv/lib64/python3.6/site-packages/flask/app.py", line 
1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/root/airflow/venv/lib64/python3.6/site-packages/flask/app.py", line 
1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File 
"/root/airflow/venv/lib64/python3.6/site-packages/airflow/www/auth.py", line 
34, in decorated
       return func(*args, **kwargs)
     File 
"/root/airflow/venv/lib64/python3.6/site-packages/airflow/www/views.py", line 
532, in index
       user_permissions = 
current_app.appbuilder.sm.get_current_user_permissions()
     File 
"/root/airflow/venv/lib64/python3.6/site-packages/airflow/www/security.py", 
line 229, in get_current_user_permissions
       {(perm_view.permission.name, perm_view.view_menu.name) for perm_view in 
role.permissions}
     File 
"/root/airflow/venv/lib64/python3.6/site-packages/airflow/www/security.py", 
line 229, in <setcomp>
       {(perm_view.permission.name, perm_view.view_menu.name) for perm_view in 
role.permissions}
     File 
"/root/airflow/venv/lib64/python3.6/site-packages/sqlalchemy/orm/attributes.py",
 line 453, in __get__
       return self.impl.get(state, dict_)
     File 
"/root/airflow/venv/lib64/python3.6/site-packages/sqlalchemy/orm/attributes.py",
 line 897, in get
       value = self.callable_(state, passive)
     File 
"/root/airflow/venv/lib64/python3.6/site-packages/sqlalchemy/orm/strategies.py",
 line 831, in _load_for_state
       % (orm_util.state_str(state), self.key)
   **sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <PermissionView 
at 0x7fef4bf3e4e0> is not bound to a Session; lazy load operation of attribute 
'view_menu' cannot proceed (Background on this error at: 
http://sqlalche.me/e/14/bhk3)**


-- 
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