Error when trying to add properties in python script
Hi there, I want to create an programaticaly and then set some attributes. While creating a property works fine, I can not access it afterwards. The following code: context.invokeFactory('PortalFolder', 'an_id') obj = context[str_id] obj.manage_addProperty("alter", 21, int) obj.manage_changeProperties({"alter": 21}) produces the following error: Error Type: TypeError Error Value: int requires exactly 1 argument; 0 given Where do I err? Thanks for any tips Robert
On Saturday, August 11, 2001, at 07:42 AM, Robert Rottermann wrote:
Hi there,
I want to create an programaticaly and then set some attributes.
While creating a property works fine, I can not access it afterwards.
The following code:
context.invokeFactory('PortalFolder', 'an_id') obj = context[str_id] obj.manage_addProperty("alter", 21, int) obj.manage_changeProperties({"alter": 21})
Try: obj.manage_addProperty("alter", 21, 'int') -steve
participants (2)
-
Robert Rottermann -
Steve Spicklemire