For anyone encountering this sort of error:
File "/.../web/db.py", line 404, in rollback
raise TransactionError, "not in a transaction"
TransactionError: not in a transaction
This is caused when some code attempts a rollback even though a
database transaction hasn't been initiated.
One possible cause is that your database user doesn't have the
permissions required to execute the desired database query (In my
case, I didn't have permissions set to 'delete' in the database).
If this is not your cause, you can probably check your database logs
to see whether it is registering anything prior to the
TransactionError.
You can also solve this the quick and dirty way by using the 'cares'
keyword for the offending rollback() call as in
web.rollback(cares=False). This will simply have it ignore the fact
that it failed to rollback. Note that this is poor practice, and it's
probably better to look at what's causing it instead.
MP
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---