[Zope3-Users] very simple problem with getUtility
Christophe Combelles
ccomb at free.fr
Sun Jan 7 08:17:56 EST 2007
Hi
There is probably something that I don't understand with registration. I'm doing
the very simple thing:
- I start zope with an empty zodb
- I add a Folder
- I go to the registration tab and register it for IFolder as 'foo'
- I stop zope, and start debugzope:
>>> from zope.component import getUtility
>>> from zope.app.folder.interfaces import IFolder
>>> getUtility(IFolder, 'foo')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/zope/component/_api.py", line 207, in
getUtility
raise ComponentLookupError(interface, name)
zope.component.interfaces.ComponentLookupError: (<InterfaceClass
zope.app.folder.interfaces.IFolder>, 'foo')
What am I missing?
Christophe
More information about the Zope3-users
mailing list