[mod_python] Import Error (windows)

Neo Eureka neo at https.ru
Sat Mar 29 22:58:26 EST 2003


 You should not add ".py" extension.
The correct line is:

 PythonHandler mptest


> Python 2.2
> Apache 2.0.44
> mod_python-3.0.3.win32.exe

> new to mod_python and list so be gentle with me

> searched through the list and found similar probs but on different
> platforms and versions
> but no answers (probably me not looking hard enough)

> anyway following tutorial and set httpd.conf as said :-

> LoadModule python_module modules/mod_python.so

> <Directory "C:\Program Files\Apache Group\Apache2\htdocs\test"> 
>   AddHandler python-program .py
>   PythonHandler mptest.py 
>   PythonDebug On 
> </Directory>
 
> error reads:-
> Mod_python error: "PythonHandler mptest.py"
> Traceback (most recent call last):
>   File "C:\Python22\Lib\site-packages\mod_python\apache.py", line 320, in HandlerDispatch
>     module = import_module(module_name, config)
>   File "C:\Python22\Lib\site-packages\mod_python\apache.py", line 496, in import_module
>     f, p, d = imp.find_module(parts[i], path)

> ImportError: No module named py

> it's probably a simple answer but can anyone help
> thanks in advance
> stephen


--- 
Neo Eureka / mailto:neo at https.ru




More information about the Mod_python mailing list