On Apr 6, 2005, at 5:10 AM, Nik Klever wrote:
Before switching to Twisted 2.0.0 and Nevow 0.4.1 I used a class inherited from rend.Page in a resource script (a short example of this method was renaming hellostan.py to hellostan.rpy and replacing the last 3 lines to "resource = Page()" )
This method brings now the error message "twisted.python.components.CannotAdapt: <Page object at 0x...> to <MetaInterface twisted.web.resource.IResource>".
Looking into the code I found that nevow.compy.MetaInterfaces is not compatible with the new Twisted 2.0.0 twisted.python.components.MetaInterface, because it's borrowed from an older version of Twisted 1.3.0 twisted.python.components.MetaInterface.
Is there a plan to update nevow.compy to the new Zope Interface style ?
As you discovered, you cannot currently use zope.interface style interfaces with Nevow, you must use the old twisted style ones. There is a plan to fix this: see the "zope-interface" branch in SVN, which has not yet been merged. I started that branch and it seems to work, but have not had time to merge it back into trunk. James