ZMySQLDA troubles in Zope 2.0
Hi, Got the DA compiled yesterday, and now I'm having all kinds of trouble getting some semi-complex queries from my old perl scripts to work. Below is the response given by Zope to a good example: --- Error, exceptions.KeyError: unhandled SQL used: select i.name, c.language, c.notes, c.condition, c.bid, c.cardnum, i.rarity from cardinfo i, cards c where i.cardcode=c.cardcode order by i.name limit 10 Traceback (innermost last): File /usr/local/dc/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/dc/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/dc/Zope-2.0.0/lib/python/Zope/__init__.py, line 201, in zpublisher_exception_hook (Object: test_listing) File /usr/local/dc/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/dc/Zope-2.0.0/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_test) File /usr/local/dc/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: manage_test) File /usr/local/dc/Zope-2.0.0/lib/python/Shared/DC/ZRDB/DA.py, line 316, in manage_test (Object: test_listing) File /usr/local/dc/Zope-2.0.0/lib/python/Shared/DC/ZRDB/DA.py, line 297, in manage_test (Object: test_listing) File /usr/local/dc/Zope-2.0.0/lib/python/Shared/DC/ZRDB/DA.py, line 401, in __call__ (Object: test_listing) File lib/python/Products/ZMySQLDA/db.py, line 191, in query KeyError: (see above) --- Simple, one-column queries seem to work fine. A search of the mailing list archives on "unhandled" didn't bring up much except one other person who'd had a similar problem and wasn't able to find an explanation. MySQL is version 3.21.33b and the query works fine when tested from the MySQL monitor. -->ben
On Wed, 15 Sep 1999, ben andrew fulton wrote:
File lib/python/Products/ZMySQLDA/db.py, line 191, in query KeyError: (see above)
Having just hacked around in there, the error is due to the underlying MySQLmodule returning a column type that Zope hasn't anticipated. Have your browser display the HTML source, that will provide more information. If you missed it, I have a new MySQL interface for Python, but it's for MySQL 3.22 and won't work on 3.21. It also has a patch to make ZMySQLDA work with it. See http://starship.python.net/crew/adustman for more info. -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
participants (2)
-
Andy Dustman -
ben andrew fulton