[mod_python] newb question on apache conf

lafras at sun.ac.za lafras at sun.ac.za
Fri Feb 25 09:36:10 EST 2005


hi,

i have the following in my apache conf file,

<Directory "path/to/my/directory">
     SetHandler mod_python
     PythonHandler mod_python.publisher
     PythonDebug On
</Directory>

I get some odd behaviour though,

when opening up a *.py script in my browser, everything works fine and 
apache displays what it should, however when i try open a *.html file, i 
get this error,

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

   File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, 
in HandlerDispatch
     result = object(req)

   File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 
98, in handler
     path=[path])

   File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 454, 
in import_module
     f, p, d = imp.find_module(parts[i], path)

ImportError: No module named XXX

where XXX is a file XXX.html i'm trying to open.

could someone please point me in the right direction,
thanks in advance,

lafras


More information about the Mod_python mailing list