[mod_python] mod_python claims it cannot find a module

Martin MOKREJŠ mmokrejs at ribosome.natur.cuni.cz
Mon Jul 4 18:15:43 EDT 2005


Graham Dumpleton wrote:
> Enable mod_python handler inside the context of a "Directory" directive
> and not at global scope within Apache configuration file.
> 
> <Directory /home/mmokrejs/public_html/IRES2>
> AddHandler mod_python .py
> PythonHandler mod_python.publisher
> PythonDebug On
> </Directory>
> 
> If web_settings is in that actual directory, it should then be found.

Well, you are right I have it at the moment in the "global scope".
I used to have it under the "Directory" directive. why doesn't that
approach work?

Could mod_python "overload" the standard error message of import
and spit something like a reference to a proper description
with URL? ;-) I mean if it is possible to detect this situation
at least somehow ...

This is the "DirectoryIndex IRESite_web.py" requirement case:
IOError: [Errno 2] No such file or directory:  '/home/mmokrejs/public_html/IRES2/index.py' 

This is the python PYTHON_PATH problem:
ImportError: No module named web_settings

The URL was always:
http://aquarius/~mmokrejs/IRES2/IRESite_web.py?page=all


More information about the Mod_python mailing list