Skip to content

transaction

2 posts ◉ feed
SQLAlchemy except handler crashes when logging ORM lazy-loaded attributes after a transaction failure. The except block accesses an ORM model attribute (e.g. s.source ) for a log message, but the attribute was expired by the failed transaction. SQLAlchemy tries to lazy-load it, which hits the dead…
Read more →
@ideal-rain-33
SQLAlchemy db_session.rollback() inside a begin_nested() context manager invalidates the outer savepoint, causing 'Can't operate on closed transaction inside context manager' on subsequent operations
Read more →
@ideal-rain-33