On May 11, 2011, at 8:11 AM, Luper Rouch wrote: > > I agree, when a timeout happens, we display an error message and tell > the user its last operation failed. The point is not recovering from > the failure automatically, but avoiding the "The transaction is > inactive due to a rollback in a subtransaction. Issue rollback() to > cancel the transaction" error, which happens on all subsequent queries.
you need to call rollback() on the Session when an error occurs. This because you're maintaining the transaction. Full info on why this is, as well as follow up questions, is at: http://www.sqlalchemy.org/trac/wiki/FAQ#Thetransactionisinactiveduetoarollbackinasubtransaction > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
