[Zope-dev] Zope2.7.0rc2 AttributeError: 'NoneType' object has no attribute 'setHeader'

Tony McDonald tony.mcdonald at ncl.ac.uk
Mon Feb 9 11:43:17 EST 2004


Thanks again for the reply Dieter,

On 6 Feb 2004, at 21:14, Dieter Maurer wrote:

> "REQUEST.RESPONSE" is set up in
> "ZServer.HTTPServer.zhttp_handler.continue_request".
> It should be impossible that is is "None".
>
>

Agreed.

> Maybe, we have a memory corruption.
> I have seen objects magically becoming "None" in
> Python versions with memory corruption problems (Python 2.1.1).
>
> -- 
> Dieter


Could be memory perhaps, but this is python2.3.3.

> Christian Heimes wrote:
> [...]
>
> And the next one:
>
> Python2.3.3/Zope2.70rc2/Plone2rc5.
>
> Exception Type
> AttributeError
> Exception Value
> 'str' object has no attribute 'RESPONSE'
>
> [...]
> Module Products.CMFPhoto.Photo, line 510, in clearCache
> AttributeError: 'str' object has no attribute 'RESPONSE'
>
> The relevant code line is self.REQUEST.RESPONSE.setHeader(). The error
> occured at object creation.
>
> Something really bad is going on!
>
> Christian
>
>

The problem I'm having is that these are all stock Zope products from a 
Zope2.7.0rc2 release. The traceback is coming from the Zope core.

Traceback (innermost last):
...
   Module Shared.DC.Scripts.Bindings, line 320, in
__render_with_namespace__
   Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
   Module App.special_dtml, line 175, in _exec
   Module DocumentTemplate.DT_Util, line 201, in eval
    - __traceback_info__: RESPONSE
   Module <string>, line 0, in ?
AttributeError: 'NoneType' object has no attribute 'setHeader'

This also seems different from what Christian is reporting;

> Christian Heimes wrote at 2004-2-6 23:01 +0100:
> And the next one:
>
> Python2.3.3/Zope2.70rc2/Plone2rc5.
>
>
> Exception Type
> AttributeError
> Exception Value
> 'str' object has no attribute 'RESPONSE'
>
> [...]
> Module Products.CMFPhoto.Photo, line 510, in clearCache
> AttributeError: 'str' object has no attribute 'RESPONSE'
>
> The relevant code line is self.REQUEST.RESPONSE.setHeader(). The error
> occured at object creation.
>
> Something really bad is going on!

So, I'm still baffled by this.

Many thanks to all those providing more data points. I *think* this is 
a 'Zope' thing and not a 'Tone' thing, but I've been wrong in that area 
before ;)

cheers
tone.
-- 
Dr Tony McDonald, Asst Director, FMSC. 0191 245 4223
Project Manager, FDTL-4 ePortfolios http://www.eportfolios.ac.uk/




More information about the Zope-Dev mailing list