Can't operate on closed transaction inside context manager. Please complete the context manager before emitting further commands.
Package:
sqlalchemy
4189
Exception Class:
exc.InvalidRequestError
Raise code
tImplementedError()
@classmethod
def _trans_ctx_check(cls, subject):
trans_context = subject._trans_context_manager
if trans_context:
if not trans_context._transaction_is_active():
raise exc.InvalidRequestError(
"Can't operate on closed transaction inside context "
"manager. Please complete the context manager "
"before emitting further commands."
)
def __enter__(self):
subject = self._get_subject()
# none
Links to the raise (1)
https://github.com/sqlalchemy/sqlalchemy/blob/6dbcb792eb60d4e084f0d1252882a0cbad4bc673/lib/sqlalchemy/engine/util.py#L182NO FIXES YET
Just press the button and we will add solution
to this exception as soon as possible
* As many users press the button, the faster we create a fix
Add a possible fix
Please authorize to post fix