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

  File "/home/xgmde/Zope3//lib/python/zope/component/_api.py", line 207, in 
    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)

            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?


Zope3-users mailing list

Reply via email to