Re: [Zope] Z SQL test in the ZMI aborts on key error (query keyerror Solution)

2005-06-08 Thread Allen Schmidt

Found it.
Edit lib/python/Shared/DC/dtml/customDefaultReport.dtml
Replace what is there with the code below (or compare and change)
This is from our 2.7.5 install.


dtml-in %(id)s size=20 start=query_start
  dtml-if sequence-start

 dtml-if previous-sequence

   a 
href=dtml-URL;dtml-sequence-query;query_start=dtml-previous-sequence-start-number;
 (Previous dtml-var previous-sequence-size results)
   /a

 /dtml-if previous-sequence

 %(else no_table)[table border
   %(heading)s
 %(else)]

  /dtml-if sequence-start

  %(row)s

  dtml-if sequence-end

 %(else no_table)[/table%(else)]

 dtml-if next-sequence
a 
href=dtml-URL;dtml-sequence-query;query_start=dtml-next-sequence-start-number;
  (Next dtml-var next-sequence-size results)
/a

 /dtml-if next-sequence
  /dtml-if sequence-end

dtml-else

 There was no data matching this dtml-title_or_id; query.

/dtml-in



Allen


Dennis Allison wrote:


I've never had any problem with parameterless queries.  (-:

No, this is a simple case of a parameter somehow being lost in 
the ZMI interface.  



On Tue, 7 Jun 2005, Joe Bezier wrote:



Hi there,

By any chance are you trying to test a ZSQL method that doesn't 
(shouldn't) need any query parameters? For some reason (and I'm not the 
guy who can tell you why...) these types of tests always break - try 
adding '?query=' to the end of the URL. and see if that helps.


Cheers,

Joe.
On 7 Jun 2005, at 11:41, Dennis Allison wrote:



Zope 2.7.6
Python 2.3.5
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Troubleshooting Suggestions

   * This resource may be trying to reference a nonexistent object or
variable 'query'.
   * The URL may be incorrect.
   * The parameters passed to this resource may be incorrect.
   * A resource that this resource relies on may be encountering an
error.


--
Error log:

2005/06/07 03:33:03.344 GMT-7
User Name (User Id) allison (allison)
Request URL http://group1.agilemind.com/Scratch/simpleq/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'


There does not seem to be a bug like this in the collectors.

Any help/pointers appreciated.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )





___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com








___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-08 Thread Dieter Maurer
Dennis Allison wrote at 2005-6-7 03:41 -0700:
Zope 2.7.6
Python 2.3.5 
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Interesting, how long it take to fix trivial errors

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Dennis Allison
Zope 2.7.6
Python 2.3.5 
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Troubleshooting Suggestions

* This resource may be trying to reference a nonexistent object or 
variable 'query'.
* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an 
error.


--
Error log:

 2005/06/07 03:33:03.344 GMT-7
User Name (User Id) allison (allison)
Request URL http://group1.agilemind.com/Scratch/simpleq/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'


There does not seem to be a bug like this in the collectors.

Any help/pointers appreciated.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Joe Bezier

Hi there,

By any chance are you trying to test a ZSQL method that doesn't 
(shouldn't) need any query parameters? For some reason (and I'm not the 
guy who can tell you why...) these types of tests always break - try 
adding '?query=' to the end of the URL. and see if that helps.


Cheers,

Joe.
On 7 Jun 2005, at 11:41, Dennis Allison wrote:


Zope 2.7.6
Python 2.3.5
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Troubleshooting Suggestions

* This resource may be trying to reference a nonexistent object or
variable 'query'.
* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an
error.


--
Error log:

 2005/06/07 03:33:03.344 GMT-7
User Name (User Id) allison (allison)
Request URL http://group1.agilemind.com/Scratch/simpleq/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'


There does not seem to be a bug like this in the collectors.

Any help/pointers appreciated.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )





___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Tino Wildenhain
Am Dienstag, den 07.06.2005, 12:03 +0100 schrieb Joe Bezier:
 Hi there,
 
 By any chance are you trying to test a ZSQL method that doesn't 
 (shouldn't) need any query parameters? For some reason (and I'm not the 
 guy who can tell you why...) these types of tests always break - try 
 adding '?query=' to the end of the URL. and see if that helps.
 

No, they dont always break - if you use a sane *SQLDA, they
work perfectly.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Dennis Allison
I've never had any problem with parameterless queries.  (-:

No, this is a simple case of a parameter somehow being lost in 
the ZMI interface.  


On Tue, 7 Jun 2005, Joe Bezier wrote:

 Hi there,
 
 By any chance are you trying to test a ZSQL method that doesn't 
 (shouldn't) need any query parameters? For some reason (and I'm not the 
 guy who can tell you why...) these types of tests always break - try 
 adding '?query=' to the end of the URL. and see if that helps.
 
 Cheers,
 
 Joe.
 On 7 Jun 2005, at 11:41, Dennis Allison wrote:
 
  Zope 2.7.6
  Python 2.3.5
  MySQLDA-1.2.1c3
  ZMYSQLDA-2.09b3
 
 
  Site Error
 
  An error was encountered while publishing this resource.
 
  Error Type: KeyError
  Error Value: 'query'
 
  Troubleshooting Suggestions
 
  * This resource may be trying to reference a nonexistent object or
  variable 'query'.
  * The URL may be incorrect.
  * The parameters passed to this resource may be incorrect.
  * A resource that this resource relies on may be encountering an
  error.
 
 
  --
  Error log:
 
   2005/06/07 03:33:03.344 GMT-7
  User Name (User Id) allison (allison)
  Request URL http://group1.agilemind.com/Scratch/simpleq/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'
 
 
  There does not seem to be a bug like this in the collectors.
 
  Any help/pointers appreciated.
 
 
  ___
  Zope maillist  -  Zope@zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )
 
 
 
   
 ___ 
 How much free photo storage do you get? Store your holiday 
 snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
 

-- 
Dennis Allison * Computer Systems Laboratory * Gates 227
   * Stanford University *  Stanford CA  94305
   * (650) 723-9213 * (650) 723-0033 fax
   * [EMAIL PROTECTED]
   * [EMAIL PROTECTED]


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Allen Schmidt

This bounced around on the list recently. It is supposed to be fixed now but 
the solution is modifying the source and changing how the batching is done. It 
works if less than 20 records returned...blows up if more. You can test this by 
forcing your query to only return a few records. Can't remember the exact 
location of the code now. Will see what I can find it.

Allen


Dennis Allison wrote:


I've never had any problem with parameterless queries.  (-:

No, this is a simple case of a parameter somehow being lost in 
the ZMI interface.  



On Tue, 7 Jun 2005, Joe Bezier wrote:



Hi there,

By any chance are you trying to test a ZSQL method that doesn't 
(shouldn't) need any query parameters? For some reason (and I'm not the 
guy who can tell you why...) these types of tests always break - try 
adding '?query=' to the end of the URL. and see if that helps.


Cheers,

Joe.
On 7 Jun 2005, at 11:41, Dennis Allison wrote:



Zope 2.7.6
Python 2.3.5
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Troubleshooting Suggestions

   * This resource may be trying to reference a nonexistent object or
variable 'query'.
   * The URL may be incorrect.
   * The parameters passed to this resource may be incorrect.
   * A resource that this resource relies on may be encountering an
error.


--
Error log:

2005/06/07 03:33:03.344 GMT-7
User Name (User Id) allison (allison)
Request URL http://group1.agilemind.com/Scratch/simpleq/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'


There does not seem to be a bug like this in the collectors.

Any help/pointers appreciated.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )





___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com






___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )