[Zope3-Users] IntID utility not found

Florian Lindner mailinglists at xgm.de
Sun Jun 11 17:39:23 EDT 2006


Hello,
suddenly I get this error, the code used to work....

  File "/home/xgmde/Zope3//lib/python/zope/component/_api.py", line 207, in 
getUtility
    raise ComponentLookupError(interface, name)
ComponentLookupError: (<InterfaceClass zope.app.intid.interfaces.IIntIds>, '')

The problem is clear but it should not appear. It occurs upon adding my 
object. This object performs some initializations:


def onObjectAdded(event):
    if IXGM.providedBy(event.object):
        if not ISite.providedBy(event.object):
            # Make it a site
            xgm = event.object
            site_manager = LocalSiteManager(xgm)
            xgm.setSiteManager(site_manager)

            intid = ensureUtility(xgm, IIntIds, '', IntIds , asObject = True)

            cat = ensureUtility(xgm, ICatalog, '', Catalog, asObject = True)

            abbr_index = TextIndex("abbreviation", IAbbreviation)
            cat["AbbreviationIndex"] = abbr_index


When I trace into that I can see that the intid is really created and also at 
the correct place.

When I comment the catalog creation out it works and I can add the catalog 
with the ZMI without any problems. But why does it not find the IntID utility 
when created from code?

Anyone knows whats wrong?


Thanks,

Florian


More information about the Zope3-users mailing list