[Twisted-web] Nevow: returning defer.succeed() from the data_* or render_* method

en.karpachov at ospaz.ru en.karpachov at ospaz.ru
Tue Sep 13 10:14:50 MDT 2005


What's wrong with the code below?

from nevow import tags as T, loaders, rend
from twisted.internet import defer

def simple(ctx, data):
    return defer.succeed("Hello, world!")

class Simple(rend.Page):
    docFactory = loaders.stan(
        T.html[
            T.body[
                T.ul[
                    [T.li[ T.invisible(render=simple) ] for _ in xrange(1000)]
                ]
            ]
        ]
    )

I get an exception

"exceptions.RuntimeError: maximum recursion depth exceeded"

rendering this page. It's the defer.succeed what causes this error; if I
return bare string, all is ok.

Thanks in advance.

-- 
jk



More information about the Twisted-web mailing list