[mod_python] Apache Virtual Host and mod-python error

Graham Dumpleton graham.dumpleton at gmail.com
Sat Oct 20 05:19:26 EDT 2007


On 20/10/2007, Tonu Mikk <tmikk at umn.edu> wrote:
> I am getting an error when using Apache (v 2.0) Virtual Host and
> Mod-python (v3.2.10).
>
> Mod_python error: "PythonHandler roundup.cgi.apache"
> Traceback (most recent call last):
>  File "C:\Python24\lib\site-packages\mod_python\apache.py", line 276, in
> HandlerDispatch
>    newpath = eval(pathstring)
>  File "", line 1
>    /Python24/python.exe
>    ^
> SyntaxError: invalid syntax
>
> When I refresh the page, the error disappears, and the page is
> displayed.  The error tends to happen consistently when I re-start
> Apache service and go to the page for the first time.  I have modified
> the line in Virtual host directive to be C:/Python24/python.exe, but the
> same behavior happens.

What line? There should never be a need with mod_python to list the
path of the Python executable in the Apache configuration.

As someone else mentioned, post your snippet of Apache configuration
where you setup your mod_python handler. Don't post the whole
configuration, just the relevant snippet.

Graham

> I tried adding TimeOut 300 and KeepAliveTimeOut
> 15 setting to the Virtual Host directives, but they don't help with it
> either.  Any suggestions on what I could try to remedy this?
>
> Thank you,
> Tonu
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list