[mod_python]Publisher problem.

Marc Fiuczynski marcf at becomm.com
Mon Apr 23 11:34:09 EST 2001


I am using mod_python 2.7.2 on a linux RH7.0 machine running apache 1.3.14
and using Python 2.0.  Both my apache.py and publisher.py modules have minor
patches (one to reload modules in apache.py properly, the other to treat
file objects correctly in publisher.py), but those patched regions of code
are not the ones that I am seeing trouble with nor do I think they are
involved with the problem I am having.  But who knows.  Bottom line, the
line numbers listed below for publisher.py and apache.py may not match up
directly with the same modules in a pristine 2.7.2 release.

Below is a trace of the problem that I am seeing.

Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
  File "/hotbeads/local/lib/python2.0/site-packages/mod_python/apache.py",
line 189, in Dispatch
    result = object(self.req)

"/hotbeads/local/lib/python2.0/site-packages/mod_python/publisher.py", line
171, in handler
    result = apply(object, (), args)
TypeError: not enough arguments; expected 2, got 1

The odd thing is that my code seems to be called correctly. My publisher
handler has two arguments (req and xmlfile) and it successfully processes
the xmlfile and returns a correct result followed by the above text.  So, it
seems that the type error is occurring _after_ the apply() has already done
its work.  I am fairly confused as to what is going on.  Can someone help me


More information about the Mod_python mailing list