You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tornado version latest
sqlalchemy version latest
tornado-sqlalchemy lastest
with self.make_session() as session:
try:
yield as_future(
session.merge(
Learner(
id=learner_id,
)
)
)
yield session.commit()
except SQLAlchemyError as e:
yield as_future(session.rollback())
got error
Traceback (most recent call last):
File "/srv/.venv/platform/lib/python3.10/site-packages/tornado/web.py", line 1790, in _execute
result = await result
File "/srv/.venv/platform/lib/python3.10/site-packages/tornado/gen.py", line 779, in run
yielded = self.gen.throw(exc)
File "/srv/web/api/manager/uplaod.py", line 117, in post
yield as_future(session.merge(
File "/srv/.venv/platform/lib/python3.10/site-packages/tornado/gen.py", line 766, in run
value = future.result()
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: 'Learner' object is not callable
is tornado-sqlalchemy only suport query method, or my code is miss use the as_future method?
The text was updated successfully, but these errors were encountered:
tornado version latest
sqlalchemy version latest
tornado-sqlalchemy lastest
got error
is tornado-sqlalchemy only suport query method, or my code is miss use the as_future method?
The text was updated successfully, but these errors were encountered: