Hi everybody, I'm new to this group. I got the very strange error below while setting a SESSION variable. Cannot understand why, because it says it is a SQL error. Site Error An error was encountered while publishing this resource. _mysql_exceptions.NotSupportedError Sorry, a site error occurred. Traceback (innermost last): Module ZPublisher.Publish, line 163, in publish_module_standard Module Products.PlacelessTranslationService.PatchStringIO, line 45, in new_publish Module ZPublisher.Publish, line 108, in publish Module Zope.App.startup, line 226, in abort Module ZODB.Transaction, line 134, in abort Module Shared.DC.ZRDB.TM, line 63, in abort Module Products.ZMySQLDA.db, line 327, in _abort NotSupportedError: (1196, "Warning: Some non-transactional changed tables couldn't be rolled back") ---------------------------------------------------------------------- Thers is no entry on the error log for more information. I'm running zope 2.7.0 and also tried on 2.7.2-0. Both gave me the same error. The python script code is: request = container.REQUEST session = request.SESSION ## request.set('caller', 'processItem') if not request.has_key('submit'): return 'NO SUBMIT' # orderNo = session['orderNo'] if orderNo == 0: orderNo = context.createOrderHeaderPY() session.set('itemIndex', 1) session.set('orderNo', orderNo) ## <-- LINE WITH PROBLEM itemIndex = 1 else: itemIndex = int(session['itemIndex']) + 1 session.set('itemIndex', itemIndex) orderNo = session['orderNo'] # I tried setting up another SESSION variable (using a different name for it) and it works. This code was working before. It broke when I made some changes in other scripts. I'd appreciate any help. Thanks, Norma
I'm not sure this really has anything to do with sessions. Apparently during the same request that is run when this code is run, some SQL data was changed. Meanwhile, Zope has a "transaction manager" which manages all of the databases (ZODB and SQL) that are in play within your system. When a transaction can't be committed due to an error, Zope tries to abort the transaction. "Aborting the transaction" means preventing all databases from committing. In MySQL's case the abort appears to be implemented by a rollback and apparently some of your tables don't support rollback because they are created in a database that isn't transactional. Apparently some of your tables support rollback and some don't, so MySQL complains that it doesn't know what to do instead of either rolling back (transactions) or not rolling back (no transactions). I'm no MySQL expert, but I think you will need to try to figure out how to configure all of your databases/tables/connections as transactional in order to support this automatic abort/rollback. On Thu, 2004-07-22 at 14:46, Norma Silva wrote:
Hi everybody,
I'm new to this group. I got the very strange error below while setting a SESSION variable. Cannot understand why, because it says it is a SQL error.
Site Error
An error was encountered while publishing this resource.
_mysql_exceptions.NotSupportedError
Sorry, a site error occurred.
Traceback (innermost last):
Module ZPublisher.Publish, line 163, in publish_module_standard
Module Products.PlacelessTranslationService.PatchStringIO, line 45, in new_publish
Module ZPublisher.Publish, line 108, in publish
Module Zope.App.startup, line 226, in abort
Module ZODB.Transaction, line 134, in abort
Module Shared.DC.ZRDB.TM, line 63, in abort
Module Products.ZMySQLDA.db, line 327, in _abort
NotSupportedError: (1196, "Warning: Some non-transactional changed tables couldn't be rolled back")
----------------------------------------------------------------------
Thers is no entry on the error log for more information. I'm running zope 2.7.0 and also tried on 2.7.2-0. Both gave me the same error.
The python script code is:
request = container.REQUEST
session = request.SESSION
##
request.set('caller', 'processItem')
if not request.has_key('submit'):
return 'NO SUBMIT'
#
orderNo = session['orderNo']
if orderNo == 0:
orderNo = context.createOrderHeaderPY()
session.set('itemIndex', 1)
session.set('orderNo', orderNo) ## <-- LINE WITH PROBLEM
itemIndex = 1
else:
itemIndex = int(session['itemIndex']) + 1
session.set('itemIndex', itemIndex)
orderNo = session['orderNo']
#
I tried setting up another SESSION variable (using a different name for it) and it works. This code was working before. It broke when I made some changes in other scripts.
I'd appreciate any help.
Thanks,
Norma
______________________________________________________________________ _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
NotSupportedError: (1196, "Warning: Some non-transactional changed tables couldn't be rolled back")
Zope, for what ever reason, is aborting the transaction, but you wrote something into your database, and were using some non-transaction-safe tables, most likely ISAM or MyISAM tables. Unless you use transaction-safe tables, such as InnoDB or BDB, this sort of this is likely to happen and there's not much you can do about it. Zope is very transactional. MySQL *can* be transactional, but the default table types are not. Your only option (short of changing databases) is to change your database to use transaction-safe-tables; MySQL-4.0 is recommended for this, though later 3.23 versions also support them. ALTER TABLE ... TYPE=InnoDB will do the trick.
participants (3)
-
Andy Dustman -
Chris McDonough -
Norma Silva