[Zope] Error Value: 'File' object
has no attribute 'manage_fixupOwnershipAfterAdd'
Roman Klesel
roman_plonemail at lotuseyes.de
Thu Feb 16 07:33:44 EST 2006
Hello,
Jens Vagelpohl schrieb:
> If that object subclasses
> from the normal Zope Folder class (or is a Zope Folder) you *will* have
> manage_addProduct.
Yes, actually you guys a right! self.manage_addProduct is available...
Hmmm ... wonder what made me think it's not ...
Still I can't get what I want.
when I now do:
system.manage_addProduct['OFSP'].manage_addFile(fid,
title='',
file=cpu_load,
content_type='text/plain',
precondition='')
I get:
AttributeError: _getProducts
So I poked around and rose an exception like this:
raise KeyError, 'id: %s object: %s self: %s' % (id, system, self)
KeyError: 'id: gr_sys object: <Folder at > self: <Lasttest at lasttest55004>'
Where
- id is the id of the folder where I want to create the file in.
- object is the object reference of the same folder
- and self ist ... self: a folderish object.
So there seems to be something wrong with "object". It's recognized that it is a folder but for some reason
it seems that it has no real object reference.
It is created like this:
self.tgt_folder[id]=Folder()
self._setObject(id,self.tgt_folder[id])
Of course I should create it with the managed_addProduct[ ... method, but it doesn't work. I again get:
AttributeError: _getProducts
I'm getting more and more confused ...
I mean the whole thing can't be totally wrong since everything worked exept for, that the objects that I wanted to
have where of type "SimpleItem" and not "File".
So there seems to be something wrong with by parent obejct ... But again this is also not possible since i can add
a File product manually with the ZMI ..
Any light s.o.?
Roman
More information about the Zope
mailing list