[Product-Developers] Re: plone.contentratings for Plone 4
r.ritz at biologie.hu-berlin.de
Thu Feb 11 18:37:35 UTC 2010
Kees Hink wrote:
> While browsing the documentation of contentrating and executing the python code
> in a ./bin/zopepy shell, i ran into this (README.txt:93):
>>>> adapted = IUserRating(content)
> Traceback (most recent call last):
> File "<console>", line 1, in <module>
> TypeError: ('Could not adapt', <zope.container.sample.SampleContainer object at
> 0x2ad8910>, <InterfaceClass contentratings.interfaces.IUserRating>)
Wild guess: The adapter to IUserRating is registered for
an interface (or interfaces) that are no longer provided
by some or all relevant content items.
If that's the case, one would either have to mark those
content types accordingly or adjust/extend the adapter
No clue whether that points you in the right direction though,
> Could this be the cause of the problem, or is this due to some zcml setup which
> is not taken into account when running the code from the zopepy shell?
> I also tried testing using zc.recipe.testrunner, but i don't have this working yet.
More information about the Product-Developers