[Zope-dev] KeyError: 'URL' in HTTPRequest using zope2.7-py2.3.3

Dieter Maurer dieter at handshake.de
Fri Dec 2 15:45:18 EST 2005


Brian Watson wrote at 2005-12-1 20:55 -0500:
>brian w.
>--------------------
>Traceback (most recent call last):
>  File "E:\NBCJEAP\Zope\lib\python\zExceptions\ExceptionFormatter.py", line 157,
> in formatLine
>    result.extend(self.formatSupplement(supp, tb))
>  File "E:\NBCJEAP\Zope\lib\python\zExceptions\ExceptionFormatter.py", line 105,
> in formatSupplement
>    extra = self.formatExtraInfo(supplement)
>  File "E:\NBCJEAP\Zope\lib\python\zExceptions\ExceptionFormatter.py", line 231,
> in formatExtraInfo
>    extra = getInfo(1)
>  File "E:\NBCJEAP\Zope\lib\python\Products\PageTemplates\TALES.py", line 277, i
>n getInfo
> ...
>  File "E:\NBCJEAP\Zope\lib\python\ZPublisher\HTTPRequest.py", line 1295, in __r
>epr__
>    return "<%s, URL=%s>" % (self.__class__.__name__, self['URL'])
>  File "E:\NBCJEAP\Zope\lib\python\ZPublisher\HTTPRequest.py", line 1214, in __g
>etitem__
>    raise KeyError, key
>KeyError: 'URL'

The "request" in your PageTemplate context lacks an "URL".

"URL" is set in the "HTTPRequest"s constructor ("__init__").
If an "HTTPRequest" instance lacks "URL" this means either:

  *  the instance was created in a wrong way (contructor not called)

  *  "URL" was deleted after construction.


Unfortunately, the details you have provided does not allow
to say more about this problem.

-- 
Dieter


More information about the Zope-Dev mailing list