[mod_python] File does not exist: /path/to/myscript.pyc/myfunc

Graham Dumpleton graham.dumpleton at gmail.com
Thu Jan 17 15:43:57 EST 2008


You could also just upgrade to mod_python 3.3.1 provided you are stuck
with Apache 1.3, then you will not have this problem at all.

Grahan

On 18/01/2008, dirac3000 <dirac3000 at gmail.com> wrote:
> Hello,
> I am using mod_python 2.7.11-2 and my script works only the first time
> I try to run it, calling, for example
> http://myserver/path/to/myscript/myfunc. The next time I see this kind
> of error in the apache error log:
>
> [error] [client <my ip address>] File does not exist:
> /path/to/myscript.pyc/myfunc
>
> I tried to delete the pyc file, and to remove the write privileges to
> apache, and it worked (I suppose it always parses the .py this way).
> Another solution that makes it work is to add a handler for the .pyc
> extension, but don't know if this is the correct solution:
>
> <Directory /path/to/myscript>
>         AddHandler python-program .py
>         AddHandler python-program .pyc
>         PythonHandler mod_python.publisher
>         PythonDebug On
> </Directory>
>
> Is this the correct setup or am I doing something wrong?
> Any suggestion?
> _______________________________________________
> 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