[Zope] KeyError
Asad Habib
ahabib at umich.edu
Thu Jul 15 10:47:19 EDT 2004
I figured out what the problem was.
- Asad
On Thu, 15 Jul 2004, Asad Habib wrote:
> Hello. I am calling a DTML method via a link and inside this method a Z
> SQL method is called. When this method is called, Zope flags me with a
> KeyError. The error is as follows:
>
> Site Error
>
> An error was encountered while publishing this resource.
>
> Error Type: KeyError
> Error Value: 0
>
> Troubleshooting Suggestions
> This resource may be trying to reference a nonexistent object or variable
> 0.
>
> 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.
>
> For more detailed information about the error, please refer to the error
> log. If the error persists please contact the site maintainer. Thank you
> for your patience.
>
> The error log gives the following traceback:
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 100, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 40, in call_object
> Module OFS.DTMLMethod, line 130, in __call__
> - <DTMLMethod instance at 3a4f5f0>
> - URL:
> http://nameofmachine/edit_data/manage_main
> - Physical Path: /edit_data
> Module DocumentTemplate.DT_String, line 474, in __call__
> Module DocumentTemplate.DT_In, line 676, in renderwob
> Module AccessControl.ImplPython, line 161, in guarded_getitem
> Module AccessControl.ZopeGuards, line 67, in guarded_getitem
> Module Shared.DC.ZRDB.DA, line 487, in __getitem__
> Module Shared.DC.ZRDB.Aqueduct, line 313, in __getitem__
> KeyError: 0
>
>
> edit_data is the DTML method invoked via a link and the name of the Z SQL
> method is retrieve_names_sql and its definition is as follows:
>
> SELECT last_name, first_name, middle_name FROM test
> WHERE id = <dtml-var "REQUEST.SESSION.get('userId')">
>
> The Z SQL method is called using the following statement:
>
> <dtml-call "retrieve_names_sql(REQUEST, _)">
>
>
> Any help would be greatly appreciated. Thanks.
>
> - Asad
>
>
> _______________________________________________
> Zope maillist - Zope at 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 )
>
More information about the Zope
mailing list