[Zope] adding property to new Folder: can't pickle module objects
Roman Klesel
roman_plonemail at lotuseyes.de
Tue Aug 30 06:12:32 EDT 2005
Hello everyone,
again I'm stuck :-(
I have a python script that looks as follows:
results=[]
for ids in context.objectIds('Folder'):
results.append(ids)
newid = str(int(max(results)) + 1)
context.manage_addProduct['OFSP'].manage_addFolder(newid, title="person")
newaddr=getattr(context, newid)
newaddr.manage_addProperty("test", "test", string)
return 0
When I run it it returns the error:
Error Type: TypeError
Error Value: can't pickle module objects
It looks like as if the Folder doesn't get created when the
manage_addProperty() function tries to modify it.
If I comment out the line with the manage_addProperty() function the
folder however gets created and newaddr has as sensible value.
Please help me to clarify this.
Thanks in advance
Roman
More information about the Zope
mailing list