TypeError: argument 1 must be string in constructor
A class constructor has absurd arguments. For me, this came up, when my Tool was unable to initialize itself:
portal.manage_addProduct[PROJECTNAME].manage_addTool(UsabilityTool.meta_type)
File "E:\usability\Test\plone2\Data\Products\CMFCore\utils.py", line 427, in manage_addTool
obj = tool()
TypeError: argument 1 must be string, not UsabilityTool
Nasty bastard, this was very hard to pin down. UsabilityTool.__init__ seemed to be Python native method-wrapper. I had to poke around class hierarchy a while before founding out that I was using a module instead of a class in the super class declaration:
from OFS import SimpleItem
class UsabilityTool(PloneBaseTool, UniqueObject, SimpleItem, Referenceable, PropertyManager):
Here SimpleItem is module instead of a class import. You can fix this:
from OFS.SimpleItem import SimpleItem
