[Pkg-zope-developers] Bug#378030: zope3: any http request yields
Internal Server Error
Joris Patroons
jopa at kotnet.org
Wed Jul 12 18:03:49 UTC 2006
Package: zope3
Version: 3.2.1-4
Severity: normal
Tags: patch
After some updates this week, zope3 stopped working for me. Starting a
zope3 instance would go well, but any http access failed. The stack
trace always ended with:
File "/usr/lib/python2.4/site-packages/zope/app/twisted/http.py", line 59, in <lambda>
return x.addCallback(lambda data: (self.res, segments))
exceptions.AttributeError: 'Prebuffer' object has no attribute 'res'
It seems that in zope/app/twisted/http.py, the Prebuffer class overrides
the locateChild method of WrapperResource from twisted/web2/resource.py,
and over there self.res is now called self.resource. Because the
implementation of the function is now identical in both classes, I tried
commenting out the function in Prebuffer. That got everything back to
work.
The patch is trivial:
--- /tmp/http.py.orig 2006-07-12 19:59:31.883671500 +0200
+++ /usr/lib/python2.4/site-packages/zope/app/twisted/http.py 2006-07-12 19:59:42.000000000 +0200
@@ -52,13 +52,6 @@
return stream.readStream(req.stream, temp.write).addCallback(done)
- # Oops, fix missing () in lambda in WrapperResource
- def locateChild(self, ctx, segments):
- x = self.hook(ctx)
- if x is not None:
- return x.addCallback(lambda data: (self.res, segments))
- return self.res, segments
-
def createHTTPFactory(db):
resource = wsgi.WSGIResource(WSGIPublisherApplication(db))
resource = log.LogWrapperResource(resource)
(The End)
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16
Locale: LANG=en_IE at euro, LC_CTYPE=en_IE at euro (charmap=ISO-8859-15)
Versions of packages zope3 depends on:
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii lsb-base 3.1-10 Linux Standard Base 3.1 init scrip
ii python-clientcookie 1.3.0-1 Python module for automating HTTP
ii python-clientform 0.2.2-2 module for handling HTML forms on
ii python-docutils [python2.4-do 0.4-3 Utilities for the documentation of
ii python-mechanize 0.0.11a-3 stateful programmatic web browsing
ii python-pullparser 0.1.0-1 simple "pull API" for HTML parsing
ii python-twisted-conch 1:0.7.0-1 The Twisted SSH Implementation
ii python-twisted-web2 0.2.0-1 An HTTP/1.1 Server Framework
ii python-tz 2006g-1 Python version of the Olson timezo
ii python-xml 0.8.4-5 XML tools for Python
ii python-zopeinterface 3.2.1-4 The implementation of interface de
ii python2.4 2.4.3-7 An interactive high-level object-o
ii zope-common 0.5.24 common settings and scripts for zo
zope3 recommends no packages.
-- no debconf information
More information about the Pkg-zope-developers
mailing list