[Twisted-web] exception in formless with a few nevow examples

Marek Habersack grendel at caudium.net
Wed Jul 20 03:33:46 MDT 2005


On Tue, Jul 19, 2005 at 10:40:39PM -0400, Jp Calderone scribbled:
[snip]
> >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?
> >
> 
> Objects never get garbage collected in Python until it is safe for them to 
> be garbage collected.  When there is code relying on their existence that 
> might yet execute, it is not safe.
Yep, I kind of thought it could have been some obscure bug in the Python
garbage collector code.

> The real problem is that _formRenderIt is an entirely separate function, 
> and it thinks "cf" is a local, but it's totally not.  This is fixed in 
> current svn trunk at HEAD, but was broken in the 0.4.1 release.
Indeed, everything works just fine now, thanks.

regards,

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/be05c07e/attachment.bin


More information about the Twisted-web mailing list