> is that session using "autocommit" mode? >
print("--> autocommit", dbsession.autocommit) gives a False. > it looks like the error is raised on the UNLOCK ? When I comment out the UNLOCK, the exception still raises. Here is SQLA’s verbose logging: --> autocommit False 2017-12-07 11:23:52,101 INFO [sqlalchemy.engine.base.Engine][MainThread] LOCK TABLES tokens WRITE 2017-12-07 11:23:52,101 INFO [sqlalchemy.engine.base.Engine][MainThread] {} 2017-12-07 11:23:52,102 INFO [sqlalchemy.engine.base.Engine][MainThread] INSERT INTO tokens (id, user_id, client_sig) SELECT '84…20', '39…30', '0b…87' FROM dual WHERE NOT (EXISTS (SELECT * FROM tokens WHERE tokens.user_id = %(user_id_1)s AND tokens.client_sig = %(client_sig_1)s)) 2017-12-07 11:23:52,102 INFO [sqlalchemy.engine.base.Engine][MainThread] {'user_id_1': '39…30', 'client_sig_1': '0b…87'} 2017-12-07 11:23:52,103 ERROR [srv.views.exceptions][MainThread] Internal server error detected, stacktrace follows. -- 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.