tactlabs / error-archive

All issues related to tact and tact labs work
0 stars 0 forks source link

2 #220

Open rajacsp opened 4 years ago

rajacsp commented 4 years ago
Traceback (most recent call last):
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/rj/projects/tact-api-2/rest_api/user_controller.py", line 108, in get_user_by_id_api
    user_details = uss.get_user_by_id(id)
  File "/Users/rj/projects/tact-api-2/services/user_service.py", line 92, in get_user_by_id
    return user_dict.as_dict()
  File "/Users/rj/projects/tact-api-2/model/core_models.py", line 54, in as_dict
    return {c.name: getattr(self, c.name) for c in self.__table__.columns}
  File "/Users/rj/projects/tact-api-2/model/core_models.py", line 54, in <dictcomp>
    return {c.name: getattr(self, c.name) for c in self.__table__.columns}
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 276, in __get__
    return self.impl.get(instance_state(instance), dict_)
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 680, in get
    value = callable_(state, passive)
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 437, in __call__
    return strategy._load_for_state(state, passive)
  File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 410, in _load_for_state
    % (orm_util.state_str(state), self.key)
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <User at 0x109a00390> is not bound to a Session; deferred load operation of attribute 'password' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
2019-08-13 16:13:34 127.0.0.1 - - [13/Aug/2019 16:13:34] "GET /user/1 HTTP/1.1" 500 -