Hi:
I'm having a problem in some zope (2.10) code (HTTPResponse.p y) where
a method that gets imported somehow evaluates to None in certain cases
which causes a TypeError exception to be raised (eg: TypeError:
'NoneType' object is not callable). The code excerpt is below where
the exception is raised on the line with the comment 'TypeError IS
RAISED HERE'. I've read that the thread stack size may be insufficient
but the I compiled a test pthreads program on the same system to get
the default. I used pthread_attr_ge tstacksize() and it returned
3657952 (3.5 mb?). I would imagine that's enough. Any ideas how this
could occur?
from PubCore.ZEvent import Wakeup
def close(self):
DebugLogger.log ('A', id(self._reques t),
'%s %s' % (self._request. reply_code, self._bytes))
if not self._channel.c losed:
self._channel.p ush(LoggingProd ucer(self._requ est,
self._bytes), 0)
self._channel.p ush(CallbackPro ducer(self._cha nnel.done),
0)
self._channel.p ush(CallbackPro ducer(
lambda t=('E', id(self._reques t)): apply
(DebugLogger.lo g, t)), 0)
if self._shutdown:
self._channel.p ush(ShutdownPro ducer(), 0)
Wakeup()
else:
if self._close: self._channel.p ush(None, 0)
Wakeup() # TypeError IS RAISED HERE
else:
# channel closed too soon
self._request.l og(self._bytes)
DebugLogger.log ('E', id(self._reques t))
if self._shutdown:
Wakeup(lambda: asyncore.close_ all())
else:
Wakeup()
self._channel=N one #need to break cycles?
self._request=N one
Comment