how to understand traceback
Hi se'nor deiter, This was new for me. Looking at the traceback from error cudnt make out anything. The long listing given below. kindly tell me wat do u infer 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.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 222, in _exec Module Products.PageTemplates.PageTemplate, line 96, in pt_render - <ZopePageTemplate at /store_nic/consumables/index_html> Module TAL.TALInterpreter, line 190, in __call__ Module TAL.TALInterpreter, line 234, in interpret Module TAL.TALInterpreter, line 611, in do_loop_tal Module Products.PageTemplates.TALES, line 206, in setRepeat Module Products.PageTemplates.TALES, line 221, in evaluate - URL: /store_nic/consumables/index_html - Line 85, Column 0 - Expression: <PythonExpr context.getDistrictUser(distname=request.form['districtname'])> - Names: {'container': <OrderedFolder instance at 41990a10>, 'context': <OrderedFolder instance at 41990a10>, 'default': <Products.PageTemplates.TALES.Default instance at 0x40c78c6c>, 'here': <OrderedFolder instance at 41990a10>, 'loop': <SafeMapping instance at 4073cd40>, 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x40c7828c>, 'nothing': None, 'options': {'args': ()}, 'repeat': <SafeMapping instance at 4073cd40>, 'request': <HTTPRequest, URL=http://localhost:8080/store_nic/consumables/index_html>, 'root': <Application instance at 41870920>, 'template': <ZopePageTemplate at /store_nic/consumables/index_html>, 'traverse_subpath': [], 'user': nic} Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ - __traceback_info__: context.getDistrictUser(distname=request.form['districtname']) Module Python expression "context.getDistrictUser(distname=request.form['districtname'])", line 1, in <expression> Module AccessControl.ZopeGuards, line 67, in guarded_getitem KeyError: 'districtname' On Sat, 12 Mar 2005 Dieter Maurer wrote :
prabuddha ray wrote at 2005-3-11 10:17 -0000:
Ya u got me this time abzlutli but i'm jus not getting it. looks like there is something else. the define code dint work.i'm still getting the same error.
Error Type KeyError Error Value 'districtname'
You must learn to look at the traceback!
You find it in the ZMI's "Root Folder" --> "error_log". -- Dieter
prabuddha ray wrote at 2005-3-12 06:57 -0000:
... Module Products.PageTemplates.TALES, line 221, in evaluate - URL: /store_nic/consumables/index_html
You are in "store_nic/consumables/index_html" ...
- Line 85, Column 0 - Expression: <PythonExpr context.getDistrictUser(distname=request.form['districtname'])>
and try to evaluate "context.getDistrictUser(distname=...)"...
... "context.getDistrictUser(distname=request.form['districtname'])", line 1, in <expression> Module AccessControl.ZopeGuards, line 67, in guarded_getitem KeyError: 'districtname'
Your "request.form" does not contain "districtname". I suggest some background reading (e.g. the Zope Book, 2.7 edition, online) in order to understand how variables come into "request.form". -- Dieter
participants (2)
-
Dieter Maurer -
prabuddha ray