[mod_python] problem creating an instance and debugging

Daniel Rubin dlrubin at yahoo.com
Wed Jul 2 17:46:52 EST 2003


I successfully installed mod_python 3.0.3 and have it
working with apache, but one of my handlers isn't
working and I'm unable to get mod_python to record any
error messages about this particular event to the
apache error log. Basically, I have a handler called
xmlrpc that creates a python object called obj.  The
library needed to make this object gets imported
within xmlrpc.py just fine, but right at the line
where I create a new instance of obj (foo = obj()) I
get a stack dump (see below), and there are no errors
in the apache logs.  The xmlrpc.py program runs just
fine as a cgi within apache. It's when it runs with
mod_python that this fails. Any ideas?

in httpd.conf:
<Directory "/home/rubin/opt/apache/htdocs/xmlrpc">
    AddHandler python-program .py
    PythonHandler xmlrpc
    PythonDebug On
</Directory>

The stack dump:

  File "/test.py", line 52, in ?
    p = do_test(data)
  File "/test.py", line 44, in do_test
    return server.do_test(data)
  File "/home/lib/python2.2/xmlrpclib.py", line 821,
in __call__
    return self.__send(self.__name, args)
  File "/home/lib/python2.2/xmlrpclib.py", line 975,
in __request
    verbose=self.__verbose
  File "/home/lib/python2.2/xmlrpclib.py", line 853,
in request
    return self.parse_response(h.getfile())
  File "/home/lib/python2.2/xmlrpclib.py", line 886,
in parse_response
    response = f.read(1024)
  File "/home/lib/python2.2/httplib.py", line 1140, in
read
    assert not self._line_consumed and self._line_left
AssertionError



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


More information about the Mod_python mailing list