[Zope-dev] RESPONSE eaten while rendering a ZPT/maybe Python 2.3 issue

Andreas Jung lists at andreas-jung.com
Mon Nov 10 08:35:41 EST 2003


Hi,

while working with a Plone 2.0b3 site under Zope 2.7/Python 2.3.2 I 
encountered the
following error when I am trying to render a ZPT:

Error on the console:


Traceback (most recent call last):
  File 
"/develop/sandboxes/tracker/Zope/lib/python/zExceptions/ExceptionFormatter.
py", line 157, in formatLine
    result.extend(self.formatSupplement(supp, tb))
  File 
"/develop/sandboxes/tracker/Zope/lib/python/zExceptions/ExceptionFormatter.
py", line 105, in formatSupplement
    extra = self.formatExtraInfo(supplement)
  File 
"/develop/sandboxes/tracker/Zope/lib/python/zExceptions/ExceptionFormatter.
py", line 231, in formatExtraInfo
    extra = getInfo(1)
  File 
"/develop/sandboxes/tracker/Zope/lib/python/Products/PageTemplates/TALES.py
", line 274, in getInfo
    s = pprint.pformat(data)
  File "/opt/python-2.3.2/lib/python2.3/pprint.py", line 58, in pformat
    return PrettyPrinter().pformat(object)
  File "/opt/python-2.3.2/lib/python2.3/pprint.py", line 109, in pformat
    self._format(object, sio, 0, 0, {}, 0)
  File "/opt/python-2.3.2/lib/python2.3/pprint.py", line 127, in _format
    rep = self._repr(object, context, level - 1)
  File "/opt/python-2.3.2/lib/python2.3/pprint.py", line 191, in _repr
    self._depth, level)
  File "/opt/python-2.3.2/lib/python2.3/pprint.py", line 203, in format
    return _safe_repr(object, context, maxlevels, level)
  File "/opt/python-2.3.2/lib/python2.3/pprint.py", line 246, in _safe_repr
    vrepr, vreadable, vrecur = saferepr(v, context, maxlevels, level)
  File "/opt/python-2.3.2/lib/python2.3/pprint.py", line 286, in _safe_repr
    rep = `object`
  File 
"/develop/sandboxes/tracker/Zope/lib/python/ZPublisher/HTTPRequest.py", 
line 1291, in __repr__
    return "<%s, URL=%s>" % (self.__class__.__name__, self['URL'])
  File 
"/develop/sandboxes/tracker/Zope/lib/python/ZPublisher/HTTPRequest.py", 
line 1210, in __getitem__
    raise KeyError, key
KeyError: 'URL'

Message in the error_log/browser


Traceback (innermost last):

    * Module ZPublisher.Publish, line 161, in publish_module_standard
    * Module ZPublisher.Publish, line 125, in publish
    * Module Zope.App.startup, line 205, in zpublisher_exception_hook
    * Module ZPublisher.Publish, line 98, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module Shared.DC.Scripts.Bindings, line 252, in __call__
    * Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
    * Module Products.CMFCore.FSPageTemplate, line 189, in _exec
    * Module Products.CMFCore.FSPageTemplate, line 122, in pt_render
    * Module Products.PageTemplates.PageTemplate, line 96, in pt_render
      <FSPageTemplate at /plone/pcng_issue_view used for 
/plone/PloneCollectorNG.2003-11-10.6925493633/20>
    * Module TAL.TALInterpreter, line 189, in __call__
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 663, in do_useMacro
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 408, in do_optTag_tal
    * Module TAL.TALInterpreter, line 393, in do_optTag
    * Module TAL.TALInterpreter, line 388, in no_tag
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 663, in do_useMacro
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 686, in do_defineSlot
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 408, in do_optTag_tal
    * Module TAL.TALInterpreter, line 393, in do_optTag
    * Module TAL.TALInterpreter, line 388, in no_tag
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 663, in do_useMacro
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 408, in do_optTag_tal
    * Module TAL.TALInterpreter, line 393, in do_optTag
    * Module TAL.TALInterpreter, line 388, in no_tag
    * Module TAL.TALInterpreter, line 233, in interpret
    * Module TAL.TALInterpreter, line 459, in do_setLocal_tal
    * Module Products.PageTemplates.TALES, line 220, in evaluate
    * Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
      __traceback_info__: request.RESPONSE.setHeader('Content-Type', 
'text/html;charset=%s' % charset)
    * Module Python expression "request.RESPONSE.setHeader('Content-Type', 
'text/html;charset=%s' % charset)",
line 1, in <expression>
    * Module ZPublisher.HTTPRequest, line 1216, in __getattr__

AttributeError: RESPONSE (Also, an error occurred while attempting to 
render the standard error message.)

At the moment I have no idea where is error comes from (maybe a Python 2.3 
issue?!). At least
very strange.....

-aj



More information about the Zope-Dev mailing list