On Sat, 2004-02-07 at 22:47, Christian Heimes wrote:
> 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.
That's it alright,
> 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.
That's it alright :-)
> 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.
In this case it's being callet by Photo.__init__ -> OFS.Image.__init__ ->
Here's the traceback:
Traceback (innermost last):
File /opt/zope/sw/Zope-264rc2/lib/python/ZPublisher/Publish.py, line 98, in publish
File /opt/zope/sw/Zope-264rc2/lib/python/ZPublisher/mapply.py, line 88, in mapply
File /opt/zope/sw/Zope-264rc2/lib/python/ZPublisher/Publish.py, line 39, in
File /opt/zope/sw/Zope-264rc2/lib/python/webdav/NullResource.py, line 108, in PUT
File /home/leo/zopes/lra.com.br/Products/CMFPhotoAlbum/PhotoAlbum.py, line 69, in
File /home/leo/zopes/lra.com.br/Products/CMFCore/PortalFolder.py, line 361, in
File /home/leo/zopes/lra.com.br/Products/CMFCore/TypesTool.py, line 709, in
File /home/leo/zopes/lra.com.br/Products/CMFCore/TypesTool.py, line 398, in
File /home/leo/zopes/lra.com.br/Products/CMFPhoto/Photo.py, line 110, in addPhoto
File /home/leo/zopes/lra.com.br/Products/CMFPhoto/Photo.py, line 174, in __init__
File /home/leo/zopes/lra.com.br/Products/CMFDefault/Image.py, line 147, in __init__
File /opt/zope/sw/Zope-264rc2/lib/python/OFS/Image.py, line 124, in __init__
File /home/leo/zopes/lra.com.br/Products/CMFPhoto/Photo.py, line 400, in update_data
File /home/leo/zopes/lra.com.br/Products/CMFPhoto/Photo.py, line 510, in clearCache
AttributeError: 'str' object has no attribute 'RESPONSE'
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -