[Zope] Odd MySQL exception

Patrick Lewis pl@teleport.com
Sat, 11 Sep 1999 17:32:24 -0700 (PDT)


This is one of those requests where I hope I don't find the answer two
seconds after I send it, but I am stumped, so here it goes:

I have a Z SQL method named get_bs that I am trying to get to
work. After playing around with it, I think I have narrowed down the
problem.  With the query template:

select cash from bal_sheet

I get:

---
Error, exceptions.KeyError: unhandled 

SQL used:

select cash from bal_sheet
---

Here is the relevant traceback:

<!--
Traceback (innermost last):
  File /usr/local/zope/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py,
line 256, in publish_module
  File /usr/local/zope/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py,
line 161, in publish
  File /usr/local/zope/Zope-2.0.0a4-src/lib/python/ZPublisher/mapply.py,
line 154, in mapply
    (Object: manage_test)
  File /usr/local/zope/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py,
line 98, in call_object
    (Object: manage_test)
  File /usr/local/zope/Zope-2.0.0a4-src/lib/python/Shared/DC/ZRDB/DA.py,
line 310, in manage_test
    (Object: get_bs)
  File /usr/local/zope/Zope-2.0.0a4-src/lib/python/Shared/DC/ZRDB/DA.py,
line 291, in manage_test
    (Object: get_bs)
  File /usr/local/zope/Zope-2.0.0a4-src/lib/python/Shared/DC/ZRDB/DA.py,
line 395, in __call__
    (Object: get_bs)
  File
/usr/local/zope/Zope-2.0.0a4-src/lib/python/Products/ZMySQLDA/db.py, line
191, in query
KeyError: (see above)

-->

I believe the problem is with the bal_sheet table, because
"select * from bal_sheet" or any other multi-column select gives me
the same exception.

I haven't seen this issue on other tables in my database.  The query
works as expected at the mysql console prompt. 

Any ideas for a workaround or suggestions as to what I could be doing
wrong?

Patrick Lewis <pl@teleport.com>