[Twisted-web] exception in formless with a few nevow examples
Marek Habersack
grendel at caudium.net
Tue Jul 19 18:17:48 MDT 2005
Hello,
This is my first post to the list and I'm quite a newcomer to twisted and
nevow, so forgive me if the issue is already known. The problem is with some
Nevow examples (e.g. formpost, userdb, db, customform, formbuilder - you can
see the problem at
http://nevowexamples.adytum.us/{formpost,db,customform,formbuilder}/), the
following exception occurs when the samples are run:
exceptions.NameError: global name 'cf' is not defined
With the exception of userdb (which seems to give a slightly incorrect
traceback for the exception), the problem seems to originate at line 449 in
formless/webform.py:
447 def formRenderer(ctx, data):
448 cf = ctx.locate(iformless.IConfigurableFactory)
449 return util.maybeDeferred(cf.locateConfigurable, ctx, configurableKey
450 ).addCallback(_formRenderIt)
I'm not sure whether my guess is correct, but I perhaps the local 'cf'
variable has been garbage-collected before the _runCallbacks routine in
twisted/internet/defer.py calls the _formRenderIt?
I'm not familiar enough with Python yet to check whether my assumption is
right or not, but I'm sure somebody on the list will be able to verify that
without any problem.
I'm using twisted 2.0.1, latest Nevow svn and python 2.4 on an Ubuntu/breezy
system.
tia,
marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20050720/b68ddee3/attachment.bin
More information about the Twisted-web
mailing list