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

dirac3000 dirac3000 at gmail.com
Thu Jan 17 11:52:16 EST 2008


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?


More information about the Mod_python mailing list