[ZCM] [ZC] 1745/ 7 Comment "Z SQL error KeyError Query"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Thu Apr 14 10:49:13 EDT 2005


Issue #1745 Update (Comment) "Z SQL error KeyError Query"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1745

==============================================================
= Comment - Entry #7 by tseaver on Apr 14, 2005 10:48 am

Can you please provide the output as a diff?  E.g.:

   $ cd /path/to/Zope/SOFTWARE_HOME
   $ cvs diff -u

if you are running from a CVS checkout.  If you unpacked a tarball, then:

   $ cd /tmp
   $ tar xzf ~/tarballs/Zope-2.7.5-final.tar.gz
   $ diff -ru Zope-2.7.5-final/lib/python \
              /path/to/Zope/SOFTWARE_HOME/lib/python

________________________________________
= Comment - Entry #6 by skieu on Apr 13, 2005 7:03 pm

Thanks , this fixed my problem too.
________________________________________
= Comment - Entry #5 by zu123 on Apr 10, 2005 2:30 pm

I had the same problem. Debugging led me to /usr/lib/zope/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml.

The evaluation of the <dtml-var query url_quote> tag causes the exception. Editing both <a ...> lines in customDefaultReport.dtml seems to have fixed it for me! Changed lines follow:

<a href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence-start-number;">
...
<a href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-start-number;">
________________________________________
= Comment - Entry #4 by skieu on Apr 5, 2005 8:53 pm

Sorry I did not see any notice that current zope not work or problem with current python. However the version 2.7.4-0 does not have this problem (with current python 2.4.1 of course.

The select query is select query. ex.  select * from mytable
The create query is create query. ex.  create table test(name varchar(25))

Hope I made it clearer.
The thing is, if the query return records, it caused problem. If it is DDL query, it is not.
Check arch Linux zope does not have and see ther version is 2.7.4 I fetch the source 2.7.0 and build it in my slack server and all this problem are gone. Obviously this is the problem with current Zope and Python.

________________________________________
= Comment - Entry #3 by efge on Apr 4, 2005 9:00 pm

Also, python 2.4.1 is totally unsupported, use python 2.3.5.
________________________________________
= Comment - Entry #2 by efge on Apr 4, 2005 9:00 pm

That's not very clear. What *exact* query and paramters are you using?

________________________________________
= Request - Entry #1 by Anonymous User on Apr 4, 2005 8:50 pm

Steps:
add Z Mysql connection or Z Gladfly database connection.
test the connection is ok with select query / create query.

add Z SQL Method
In the Query template; is type a select Query and Save and Test; go error. Create query seems to be fine.

Site Error
An error was encountered while publishing this resource.
Error Type: KeyError
Error Value: 'query'

The error log file is:
Time  	2005/04/05 12:49:41.559 GMT+12
User Name (User Id) 	ppc (ppc)
Request URL 	http://10.0.44.12:8080/testcps/manage_test
Exception Type 	KeyError
Exception Value 	'query'

Traceback (innermost last):

    * Module ZPublisher.Publish, line 101, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module Shared.DC.ZRDB.DA, line 337, in manage_test
    * Module DocumentTemplate.DT_String, line 474, in __call__
    * Module DocumentTemplate.DT_In, line 602, in renderwb
    * Module DocumentTemplate.DT_Var, line 219, in render

KeyError: 'query'




==============================================================



More information about the Zope-Collector-Monitor mailing list