Help with mod_python

Stefan Schwarzer sschwarzer at sschwarzer.net
Sat Aug 31 17:00:17 EDT 2002


Hi Joseph

probably a better place to ask is the mod_python mailing list. (Or have you? :-) )

Joseph Youssef wrote:
> the file I ran here was called mptest.py
> 
> -----------------------------------------------
> Mod_python error: "PythonHandler mptest"
> 
> Traceback (most recent call last):
> 
>   File "C:\PROGRAM FILES\PYTHON\lib\mod_python\apache.py", line 181, in
> Dispatch
>     module = import_module(module_name, _req)
> 
>   File "C:\PROGRAM FILES\PYTHON\lib\mod_python\apache.py", line 332, in
> import_module
>     f, p, d = imp.find_module(parts[i], path)
> 
> ImportError: No module named mptest
> ----------------------------------------------
> I don't know how to fix it so if you know how then please help

Maybe mptest.py isn't in the PYTHONPATH that your handler sees. My experience
with Apache handlers is that you best set the PYTHONPATH in the environment
where you start the webserver. Using SetEnv between the Handler directives is
of (or always?) not enough.

HTH, good luck!

Stefan




More information about the Python-list mailing list