Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazy load bug for Authors #172

Open
dadamsncsa opened this issue Apr 27, 2022 · 0 comments
Open

lazy load bug for Authors #172

dadamsncsa opened this issue Apr 27, 2022 · 0 comments
Labels

Comments

@dadamsncsa
Copy link
Member

Describe the bug

ERROR:gresq.util.util:Traceback (most recent call last):
  File "/home/dadams/devel/GSAMain/src/gresq/util/util.py", line 58, in wrapper
    return func(*args, **kwargs)
  File "/home/dadams/devel/GSAMain/src/gresq/dashboard/query_2_0/query_2_0.py", line 574, in select
    self.provenance_tab.update(s.authors)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 481, in __get__
    return self.impl.get(state, dict_)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 941, in get
    value = self._fire_loader_callables(state, key, passive)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 977, in _fire_loader_callables
    return self.callable_(state, passive)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 862, in _load_for_state
    raise orm_exc.DetachedInstanceError(
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <Experiment at 0x7f6d502b9370> is not bound to a Session; lazy load operation of attribute 'authors' cannot proceed (Background on this error at: https://sqlalche.me/e/14/bhk3)
Traceback (most recent call last):
  File "/home/dadams/devel/GSAMain/src/gresq/util/util.py", line 58, in wrapper
    return func(*args, **kwargs)
  File "/home/dadams/devel/GSAMain/src/gresq/dashboard/query_2_0/query_2_0.py", line 574, in select
    self.provenance_tab.update(s.authors)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 481, in __get__
    return self.impl.get(state, dict_)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 941, in get
    value = self._fire_loader_callables(state, key, passive)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 977, in _fire_loader_callables
    return self.callable_(state, passive)
  File "/home/dadams/anaconda3/envs/gresq/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 862, in _load_for_state
    raise orm_exc.DetachedInstanceError(
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <Experiment at 0x7f6d502b9370> is not bound to a Session; lazy load operation of attribute 'authors' cannot proceed (Background on this error at: https://sqlalche.me/e/14/bhk3)

image

To Reproduce

Expected behavior

Screenshots

Additional context

@dadamsncsa dadamsncsa added the bug label Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant