Skip to content

lazy load bug for Authors #172

@dadamsncsa

Description

@dadamsncsa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions