[mod_python] Win32 Error:

riesch at nieuw.nl riesch at nieuw.nl
Fri Aug 3 12:09:05 EST 2001


Hi there,

I'm geussing the answer to your problem is that the python interpreter cannot find the file, since it is not located in the systempath of python. The sollution would, in this case be to add the following line to httpd.conf:

PythonPath "sys.path + ['/dir/where/mptest/is/located/']"


Hope this helps,
Richard



On Thu, Aug 02, 2001 at 10:53:22AM -0700, Xione Wrent wrote:
> I'm getting the following error, and I can't figure out why?
> 
> 
> I'm using 2.4.7 with Apache 1.3 on Win32. As far as I know, I've
> installed everything right - even getting past the typo on
> modpython.org's Windows Installation Guide (Which really should be
> changed, BTW). But anyways, the only refrence I can even find to
> anything called mptest is in my httpd.conf file - maybe I'm putting
> this:
> 
> Mod_python error: "PythonHandler mptest"
> 
> Traceback (most recent call last):
> 
>   File "c:\python21\lib\mod_python\apache.py", line 181, in Dispatch
>     module = import_module(module_name, _req)
> 
>   File "c:\python21\lib\mod_python\apache.py", line 335, in
> import_module
>     f, p, d = imp.find_module(parts[i], path)
> 
> ImportError: No module named mptest
> 
> <IfModule mod_alias.c>
>     Alias /icons/ "C:/Program Files/Apache Group/Apache/icons/"
>     <Directory "C:/Program Files/Apache Group/Apache/icons">
>         Options Indexes MultiViews
>         AllowOverride None
>         Order allow,deny
>         Allow from all
>     </Directory>
>     ScriptAlias /cgi-bin/ "C:/Program Files/Apache
> Group/Apache/cgi-bin/"
>     <Directory "C:/Program Files/Apache Group/Apache/cgi-bin">
>         AllowOverride None
>         Options None
>         Order allow,deny
>         Allow from all
>     </Directory>
>     <Directory "C:/Program Files/Apache Group/Apache/htdocs/python">
>         AddHandler python-program .py
>         PythonHandler mptest
>         PythonDebug on
>     </Directory>
> </IfModule>
> 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list