Hi,
We are seeing exceptions:AssertionError being raised when of our APIs has a 
long running query. In code we are rolling back transaction if any error is 
received while committing. Basically we have this general wrapper

try:
 session.commit()
except:
 session.rollback()



Our sql alchemy version - 1.0.6
Our database - Azure SQL (sql server)


Stack trace - 
File "/code/api/named_location/resources.py", line 258, in 
create_named_locations_dataclass
File "/code/api/named_location/operations.py", line 94, in do_create
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/scoping.py", 
line 150, in do
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", 
line 754, in rollback
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", 
line 437, in rollback
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", 
line 273, in _restore_snapshot

>From the code it looks like it fails here - 
def _restore_snapshot(self, dirty_only=False):
*assert self._is_transaction_boundary* 
What does it mean, why rollback is failing ?



Thanks
Mohit

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to