[Zope3-Users] Create catalog index via script

Achim Domma domma at procoders.net
Sat Jun 17 04:38:43 EDT 2006


Hi,

I have a workspace object, which I initialize in the 
IObjectCreatedEvent. I try to add a catalog with an index like this:

ensureUtility(workspace,zope.app.intid.interfaces.IIntIds,'',IntIds,asObject=True)
catalog=ensureUtility(workspace,zope.app.catalog.interfaces.ICatalog,'',Catalog,asObject=True)
catalog["tmp"]=CategoryIndex()

workspace derives from Folder and is already a Site at this point. The 
last line causes the following error:

ComponentLookupError: (<InterfaceClass 
zope.app.intid.interfaces.IIntIds>, '')

If I remove the line, it works fine. I can see the Catalog in my 
Workspace and can add the CategoryIndex without problem!?

Seems like I'm missing something in the setup of the IIntIds utility, 
but I have no idea what it is.

regards,
Achim


More information about the Zope3-users mailing list