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

Detached instance in tasks controller #300

Open
roscisz opened this issue Nov 3, 2020 · 1 comment
Open

Detached instance in tasks controller #300

roscisz opened this issue Nov 3, 2020 · 1 comment
Labels

Comments

@roscisz
Copy link
Owner

roscisz commented Nov 3, 2020

Subject of the issue

Describe your issue here.

Your environment

List relevant info:

  • TensorHive 0.3.3

Steps to reproduce

Assign some tasks to a reservation in the calendar view. Then repeat: assign the same tasks to the same reservation.

Expected behaviour

Re-assagning tasks should not be possible while the tasks are running.

Actual behaviour

ERROR | 2020-11-03 16:20:28 | MainThread | MSG: Exception on /api/0.3/tasks [GET] | FROM: tensorhive.api.APIServer
Traceback (most recent call last):
File "/home/tensorhive/venv/lib/python3.6/site-packages/tensorhive/controllers/task.py", line 167, in get_all
content, status = business_get_all(user_id, sync_all)
File "/home/tensorhive/venv/lib/python3.6/site-packages/tensorhive/controllers/task.py", line 275, in business_get_all
synchronize(task.id)
File "/home/tensorhive/venv/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 276, in get
return self.impl.get(instance_state(instance), dict_)
File "/home/tensorhive/venv/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 677, in get
value = state._load_expired(state, passive)
File "/home/tensorhive/venv/lib/python3.6/site-packages/sqlalchemy/orm/state.py", line 660, in _load_expired
self.manager.deferred_scalar_loader(self, toload)
File "/home/tensorhive/venv/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 913, in load_scalar_attributes
"attribute refresh operation cannot proceed" % (state_str(state))
sqlalchemy.orm.exc.DetachedInstanceError: Instance <Task at 0x7f1ef437bac8> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)

@roscisz
Copy link
Owner Author

roscisz commented Nov 3, 2020

could be a duplicate of #174

@gebsh gebsh removed their assignment Sep 11, 2023
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

2 participants