[Twisted-Python] nevow.compy.CannotAdapt: WovenContext...
Mohamed Lrhazi
mohamed at your-site.com
Tue Jan 4 14:37:23 MST 2005
I copied some code from an existing site of mine to a new machine and
boom.... does not work anymore :) the code is based on the guard
example... I actually went on to remove more and more of my code till I
realized that even with the basic example itself it fails after the user
logged in :
It seems the code that fails is:
def render_sessionId(self, context, data):
sess = inevow.ISession(context)
return context.tag[sess.uid]
The complete trace follows. Any ideas? I probably forget to install
something... did I?
this is gentoo standard ebuilds for python, twisted and nevow:
2005/01/04 16:31 EST [HTTPChannel,0,127.0.0.1] Traceback (most recent
call last):
File
"/usr/lib/python2.3/site-packages/twisted/protocols/http.py", line 557,
in requestReceived
self.process()
File "/usr/lib/python2.3/site-packages/nevow/appserver.py",
line 129, in process
return self.site.getResourceFor(
File
"/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line 214,
in addCallback
callbackKeywords=kw)
File
"/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line 205,
in addCallbacks
self._runCallbacks()
--- <exception caught here> ---
File
"/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line 338,
in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "/usr/lib/python2.3/site-packages/nevow/appserver.py",
line 132, in <lambda>
lambda resource: inevow.IResource(resource).renderHTTP(self)
File "/usr/lib/python2.3/site-packages/nevow/rend.py", line
363, in renderHTTP
return self.flattenFactory(doc, ctx, writer, finisher)
File "/usr/lib/python2.3/site-packages/nevow/rend.py", line
227, in deferFlattenFactory
return deferflatten(stan, ctx, writer).addCallback(finisher)
File "/usr/lib/python2.3/site-packages/nevow/rend.py", line
223, in deferflatten
drive()
File "/usr/lib/python2.3/site-packages/nevow/rend.py", line
207, in drive
deferred, returner = iterable.next()
File "/usr/lib/python2.3/site-packages/nevow/flat/ten.py",
line 71, in iterflatten
for item in gen:
File
"/usr/lib/python2.3/site-packages/nevow/flat/flatstan.py", line 89, in
TagSerializer
yield serialize(toBeRenderedBy,context)
File "/usr/lib/python2.3/site-packages/nevow/flat/ten.py",
line 53, in serialize
return serializer(obj, context)
File
"/usr/lib/python2.3/site-packages/nevow/flat/flatstan.py", line 215, in
DirectiveSerializer
return serialize(renderer, context)
File "/usr/lib/python2.3/site-packages/nevow/flat/ten.py",
line 53, in serialize
return serializer(obj, context)
File
"/usr/lib/python2.3/site-packages/nevow/flat/flatstan.py", line 199, in
MethodSerializer
return FunctionSerializer(original, context, nocontext)
File
"/usr/lib/python2.3/site-packages/nevow/flat/flatstan.py", line 184, in
FunctionSerializer
result = original(context, data)
File "<string>", line 209, in render_sessionId
File "/usr/lib/python2.3/site-packages/nevow/compy.py", line
73, in __call__
raise CannotAdapt("%s (type %s) cannot be adapted to %s." %
nevow.compy.CannotAdapt: WovenContext(tag=Tag('',
specials={'render': Unset}, children=[''])) (type
nevow.context.WovenContext) cannot be adapted to <class
'nevow.inevow.ISession'>.
More information about the Twisted-Python
mailing list