[Twisted-Python] Traceback on loseConnection

Jean-Paul Calderone exarkun at divmod.com
Wed Feb 4 09:59:12 EST 2009

On Wed, 04 Feb 2009 11:04:26 +0100, Werner Thie <wthie at thiengineering.ch> wrote:
>Hi all
>My users are complaining that they get the odd disconnect while using my 
>site built with nevow/athena on FreeBSD 7.1 with the poll reactor. I 
>recently switched to twisted 8.2 release and am now observing 199 'Unhandled 
>Error' out of 298436 logged requests with the following traceback.
>Any clues?
>TIA, Werner
> [snip]
>           File "/usr/local/lib/python2.5/site-packages/Twisted-8.2.0_r26128- 
>py2.5-freebsd-7.1-RELEASE-amd64.egg/twisted/web/proxy.py", line 79, in 
>             self.father.channel.transport.loseConnection()
>         exceptions.AttributeError: 'NoneType' object has no attribute 

Anywhere there are that many dots in a single expression, there's bound to
be trouble. :)

It's probably something rather simple, like the connection being lost near
when the response ends.  It's probably also pretty easy to fix (by being
more careful in how lost connections are handled).  If you can create a
short example which reproduces the problem, that'll go a long way towards
helping it get fixed.  I suggest instrumenting the codepath that sets the
"channel" attribute to None and watching to see what happens.


More information about the Twisted-Python mailing list