[Zope] simple enough: adding a folder???

Marco Mariani m.mariani@imola.nettuno.it
Thu, 4 May 2000 17:41:35 +0200


I've taken my method and cut away almost everything. Now why doesn't this work?


def NewArticolo(self,REQUEST,RESPONSE):
    r=''
 
    upload = self.upload
    upload.manage_addFolder('nuovo_folder')
    r=r+ upload['nuovo_folder'].id + ' added.'
    upload['nuovo_folder'].manage_clone(upload['01.jpg'],'nuova_fotografia.jpg')
 
    return r
        

I call it as an external method. "self" contains a folder called 'upload'.

It gives me the following:



Error Type: AttributeError
Error Value: 'None' object has no attribute 'get'

[...]

File /var/lib/zope/Extensions/upload.py, line 35, in NewArticolo
    (Object: ElementWithAttributes)
  File /usr/lib/zope/lib/python/OFS/CopySupport.py, line 284, in manage_clone
    (Object: ElementWithAttributes)
  File /usr/lib/zope/lib/python/OFS/CopySupport.py, line 362, in _verifyObjectPaste
    (Object: ElementWithAttributes)
AttributeError: (see above)



If I comment out the .manage_clone, the .id works and prints out "nuovo_folder added"
(but I don't see the folder in the management interface).

Why must life be so hard?


Thanks.