[Zope] More ZMySQLDA troubleshooting w/ Zope 2.0.0

ben andrew fulton BenFulton@bigfoot.com
Thu, 16 Sep 1999 07:05:12 +0000


OK, so I figured out what it is that the interface doesn't seem to like
about my queries. First, a recap of the general error and traceback:

---

Error, exceptions.KeyError: unhandled 

SQL used:

select sessioncode
from users
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_auction_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_auction_listing)
  File /usr/local/dc/Zope-2.0.0/lib/python/Shared/DC/ZRDB/DA.py, line
297, in manage_test
    (Object: test_auction_listing)
  File /usr/local/dc/Zope-2.0.0/lib/python/Shared/DC/ZRDB/DA.py, line
401, in __call__
    (Object: test_auction_listing)
  File lib/python/Products/ZMySQLDA/db.py, line 191, in query
KeyError: (see above)

---

After some trial and error, I discovered that db.py is apparently
bombing on columns of type bigint and mediumint. "sessioncode" in the
above example is a bigint column type, and if I select a char, decimal,
or smallint column instead, the query runs fine (although an unsigned
smallint will come back with an "L" appended to each number). I'm now
using MySQL version 3.22.25-log after upgrading my Debian installation
to unstable for the hell of it. Any idea what might be causing this
problem, and if there's a workaround I can implement in my query? Will
the MySQL db interface for Python that was just released into beta
handle this situation better?

Thanks, I hope I'm closing in on a solution,

-->ben