[Twisted-web] [cpushare@cpushare.com: KLive Exception]

Andrea Arcangeli andrea at cpushare.com
Sat Jan 21 19:01:52 MST 2006


I've already sent it to David privately, but posting it here may have a
larger audience (I imagine foom may be interested in it too). This is
the first sms/email-exception since I deployed web2 in production (told
you it would have been a good contribution to start testing it). It was
harmless, but we've to fix it.

Checking for self.stream is not None would be enough, but I suspect it
would be the wrong fix. I mean, how can it happen that the stream is
NULL in the _LogByteCounter?

    def close(self):
        if self.done:
            done=self.done; self.done=None
            done(False, self.len)
	^^^^^^^^^^^ was NULL

btw, I'm going to add in the CPUShare-Twisted branch addCookie/isSecure
to the request and setCookie to the response objects (if you start using
mercurial you'll then get them by pulling my tree).

----- Forwarded message from cpushare at cpushare.com -----

Date: Sat, 21 Jan 2006 10:02:31 +0100 (CET)
From: cpushare at cpushare.com
Subject: KLive Exception
X-Mailbox-Line: From nobody Sat Jan 21 10:02:31 2006

Traceback (most recent call last):
  File "/home/build/bin/i686/python-20060121/lib/python2.4/site-packages/twisted/internet/defer.py", line 307, in _runCallbacks
  File "/home/build/bin/i686/python-20060121/lib/python2.4/site-packages/twisted/web2/server.py", line 375, in _cbFinishRender
  File "/home/build/bin/i686/python-20060121/lib/python2.4/site-packages/twisted/internet/defer.py", line 229, in callback
  File "/home/build/bin/i686/python-20060121/lib/python2.4/site-packages/twisted/internet/defer.py", line 294, in _startRunCallbacks
--- <exception caught here> ---
  File "/home/build/bin/i686/python-20060121/lib/python2.4/site-packages/twisted/internet/defer.py", line 307, in _runCallbacks
  File "/home/build/bin/i686/python-20060121/lib/python2.4/site-packages/twisted/web2/http.py", line 404, in writeResponse
  File "/home/build/bin/i686/python-20060121/lib/python2.4/site-packages/twisted/web2/log.py", line 41, in close
exceptions.AttributeError: 'NoneType' object has no attribute 'close'

----- End forwarded message -----

More information about the Twisted-web mailing list