[Zope3-Users] More on adapter registration problem :-(

Chris Withers chris at simplistix.co.uk
Tue Dec 18 10:23:41 EST 2007


Hi Again,

Looks like the problem is with zope.component rather than the zcml:

>>> from factories import Factory
>>> provideAdapter(Factory, adapts=(SomeClass,None),
provides=ISomething, name='something')
>>> getAdapters((SomeClass('test'),object()),ISomething)
[]
>>> from zope.component import getMultiAdapter
>>> getMultiAdapter((SomeClass('test'),object()),ISomething)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "zope/component/__init__.py", line 154, in getMultiAdapter
     raise ComponentLookupError(objects, interface, name)
zope.component.interfaces.ComponentLookupError: ((<SomeClass at test>,
<object object at 0xb73a2648>), <InterfaceClass interfaces.ISomething>,
u'')

Cheers,

Chris


More information about the Zope3-users mailing list