[Zope] Re: SQL query manage_test throws KeyError vith value 'query'

Tres Seaver tseaver at palladion.com
Wed Jun 8 09:46:29 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dennis Allison wrote:
> Failure occurs with 
> 	Zope 2.7.6 final
> 	Python 2.3.5 or Phython 2.4.1
> 	MySQLdb 1.2.1 gamma or MySQLdb 1.1.1 final
> 	ZMySQLDA 2.08 or ZMYSQLDA 2.09
> Failure does not occur with 
> 	Zope 2.6.4
> 	python 2.3.5
> 	MySQLdb 1.1.1 final
> 	ZMySQLDA 2.08
> 
> The traceback is:
> 
> Time  2005/06/07 16:47:44.967 GMT-7
> User Name (User Id) allison (allison)
> Request URL http://dev.agilemind.com/draPlay/webpagetest/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'
> 
> Failure is highly repeatable and happens for queries of the form
> 
> 	select * from table
> 
> The REQUEST shows:
> 
> form
> SUBMIT 'Submit Query'
> cookies
> tree-s 'eJzTyCkw5NLIKTDiClZ3hANXW3WuAmOuxEQ9AIOOB9Q'
> __ac_name 'allison'
> lazy items
> SESSION <bound method SessionDataManager.getSessionData of 
> <SessionDataManager instance at 40ddef50>>
> other
> n_ 5
> 
> REQUEST_METHOD'GET'
> HTTP_KEEP_ALIVE'300'
> SERVER_PROTOCOL'HTTP/1.1'
> QUERY_STRING'SUBMIT=Submit+Query'
> 
> Somewhere between manage_testForm and manage_test something fails,
> possibly as the query goes off to be rendered through the DocumentTemplate
> mechanism.  Right at the moment, I'm stuck.  Advice, clues appreciated.

Thanks for the detailed report.  I can reproduce the bug, which is not
related to MySQL.  Please try the attached patch:  if it works for you,
please submit a collector issue, attaching the patch, at:

  http://www.zope.org/Collectors/Zope


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCpva0+gerLs4ltQ4RAl7/AJ93qN07EWszJFiRwi+hYgVctEtuBQCgrDwc
+L+86GkTxdmy+l9ql9pHr7A=
=pduQ
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zsql_batching.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050608/14320006/zsql_batching.bin


More information about the Zope mailing list