Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

NotSupportedError - ZMySQLDA -- Help! ;-)

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


chrisk at nipltd

Sep 4, 2001, 3:15 AM

Post #1 of 3 (760 views)
Permalink
NotSupportedError - ZMySQLDA -- Help! ;-)

When using ZMySQLDA to update a row in a table, we get the following error:

Site Error
An error was encountered while publishing this resource.

_mysql_exceptions.NotSupportedError

Sorry, a site error occurred.

Traceback (innermost last):
File /usr/local/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
223, in publish_module
File /usr/local/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
179, in publish
File /usr/local/zope/2.4.0_base/lib/python/Zope/__init__.py, line 245, in
abort
File /usr/local/zope/2.4.0_base/lib/python/ZODB/Transaction.py, line 179,
in abort
File /usr/local/zope/2.4.0_base/lib/python/Shared/DC/ZRDB/TM.py, line 126,
in abort
File /usr/local/hosting/accounts/hosting/Products/ZMySQLDA/db.py, line
297, in _abort
NotSupportedError: (1196, "Warning: Some non-transactional changed tables
couldn't be rolled back")

The changes are correctly reflected in the database, however Zope raises
this error. When tested using the ZSQL methods test function it completes
correctly. Ideas??

On the last line of the traceback, the line number 297 should be 296 but our
print statement has raised the number.
Zope is 2.4.0 and Python is 2.1. ZMySQLDA is 2.0.7.

Thanks for your help
Cheers

ChrisK and HarryW


matt at zope

Sep 4, 2001, 6:48 AM

Post #2 of 3 (714 views)
Permalink
Re: NotSupportedError - ZMySQLDA -- Help! ;-) [In reply to]

OK, here's a good non-authoritative answer: contact the maintainer, Andy
Dustman. Its a judgement call as to whether or not the DA is correct
raising a NotSupportedError -- in this case, it feels like the
transaction is being rolled back by Zope, which might happen if you have
a DTML error on a page which is unrelated to the database function. The
way I read the message, the database is warning you that some data you
changed cannot be undone.
The DA shouldn't necessarily eat this, because it means the whole
transaction couldn't be rolled back.

I'm not enough of a MySQL guy to know more about when it raises that
particular error.

Chris Keyes wrote:

>When using ZMySQLDA to update a row in a table, we get the following error:
>
>Site Error
>An error was encountered while publishing this resource.
>
>_mysql_exceptions.NotSupportedError
>
>Sorry, a site error occurred.
>
>Traceback (innermost last):
> File /usr/local/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
>223, in publish_module
> File /usr/local/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
>179, in publish
> File /usr/local/zope/2.4.0_base/lib/python/Zope/__init__.py, line 245, in
>abort
> File /usr/local/zope/2.4.0_base/lib/python/ZODB/Transaction.py, line 179,
>in abort
> File /usr/local/zope/2.4.0_base/lib/python/Shared/DC/ZRDB/TM.py, line 126,
>in abort
> File /usr/local/hosting/accounts/hosting/Products/ZMySQLDA/db.py, line
>297, in _abort
>NotSupportedError: (1196, "Warning: Some non-transactional changed tables
>couldn't be rolled back")
>
>The changes are correctly reflected in the database, however Zope raises
>this error. When tested using the ZSQL methods test function it completes
>correctly. Ideas??
>
>On the last line of the traceback, the line number 297 should be 296 but our
>print statement has raised the number.
>Zope is 2.4.0 and Python is 2.1. ZMySQLDA is 2.0.7.
>
>Thanks for your help
>Cheers
>
>ChrisK and HarryW
>


chrisk at nipltd

Sep 4, 2001, 7:14 AM

Post #3 of 3 (715 views)
Permalink
RE: NotSupportedError - ZMySQLDA -- actually a DTML error, change the connection string... [In reply to]

Hi All

To confirm to anyone following this:-

Yes I had made a DTML error, so Zope tried to roll back the transaction.
my MySQL tables are not set up to support transactions, so, zope raises an
error.
This error is then reported, hiding the underlying error in the DTML.

So, to find out what the error was I needed to disable the transactions

To disable Transactions start the conection string with a '-'

so:
database [at] serve username password
becomes
-database [at] serve username password

So the error over the transaction is no longer raised, and zope can display
the error message telling me I've been stupid ;-)

Of course this does mean that the database may not be correct, as the
rollback does not occur, but in my case, its not a problem...

Hope thats a useful summary of what everyone has said to me :-)

Cheer to everyone for their help

ChrisK

----- Original Message -----
From: "Matthew T. Kromer" <matt [at] zope>
To: "Chris Keyes" <chrisk [at] nipltd>
Cc: <zope-db [at] zope>
Sent: Tuesday, September 04, 2001 2:48 PM
Subject: Re: [Zope-DB] NotSupportedError - ZMySQLDA -- Help! ;-)


> OK, here's a good non-authoritative answer: contact the maintainer, Andy
> Dustman. Its a judgement call as to whether or not the DA is correct
> raising a NotSupportedError -- in this case, it feels like the
> transaction is being rolled back by Zope, which might happen if you have
> a DTML error on a page which is unrelated to the database function. The
> way I read the message, the database is warning you that some data you
> changed cannot be undone.
> The DA shouldn't necessarily eat this, because it means the whole
> transaction couldn't be rolled back.
>
> I'm not enough of a MySQL guy to know more about when it raises that
> particular error.
>
> Chris Keyes wrote:
>
> >When using ZMySQLDA to update a row in a table, we get the following
error:
> >
> >Site Error
> >An error was encountered while publishing this resource.
> >
> >_mysql_exceptions.NotSupportedError
> >
> >Sorry, a site error occurred.
> >
> >Traceback (innermost last):
> > File /usr/local/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
> >223, in publish_module
> > File /usr/local/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
> >179, in publish
> > File /usr/local/zope/2.4.0_base/lib/python/Zope/__init__.py, line 245,
in
> >abort
> > File /usr/local/zope/2.4.0_base/lib/python/ZODB/Transaction.py, line
179,
> >in abort
> > File /usr/local/zope/2.4.0_base/lib/python/Shared/DC/ZRDB/TM.py, line
126,
> >in abort
> > File /usr/local/hosting/accounts/hosting/Products/ZMySQLDA/db.py, line
> >297, in _abort
> >NotSupportedError: (1196, "Warning: Some non-transactional changed
tables
> >couldn't be rolled back")
> >
> >The changes are correctly reflected in the database, however Zope raises
> >this error. When tested using the ZSQL methods test function it completes
> >correctly. Ideas??
> >
> >On the last line of the traceback, the line number 297 should be 296 but
our
> >print statement has raised the number.
> >Zope is 2.4.0 and Python is 2.1. ZMySQLDA is 2.0.7.
> >
> >Thanks for your help
> >Cheers
> >
> >ChrisK and HarryW
> >
>
>
>

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.