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

Christian Heimes heimes at faho.rwth-aachen.de
Sat Feb 7 19:47:22 EST 2004


Chris McDonough wrote:
 > FWIW, this often happens when "self" isn't ultimately wrapped in a
 > RequestContainer (as it always should be when dealing with TTW code or
 > code that depends on REQUEST).  The string is likely something like
 > "<Special Object Used To Force Acqusition>", which is the string that
 > represents something when it is declared as "Acquisition.Acquired" in a
 > class definition.
 >
 > The trick is finding out where the thing loses its context.  No clue in
 > this case.

If it's "<Special Object Used To Force Acqusition>" then it's (maybe) 
partly my fault. type(self.REQUEST) is "<Special Object Used To Force 
Acqusition>" when the object hasn't a real acquisition context. That's 
for example when we are still in the __init__() part of object creation.

I was pretty shure that upload_data is called in an acquisition context. 
It seems that it isn't called in a context under *every* circumstances.

Chris - was tricked again - ti(r)an




More information about the Zope-Dev mailing list