[mod_python] PYC download prompt

Graham Dumpleton grahamd at dscpl.com.au
Thu Jan 19 17:27:40 EST 2006

Sean Jamieson wrote ..
> Has anyone else run into the problem, that when there is some unknown 
> error with mod_python it spits out the .pyc version of your source code?
> either that or gives a File Not Found (rather than a useful error)?
> I have a source that is working fine on my laptop:
> Apache/2.0.54 (Ubuntu) mod_python/3.1.3 Python/2.4.2
> and my dev server has the same setup...
> What happend when I copied the source to my dev server was:
> 1) I got a Not Found error
> 2) I refreshed
> 3) I was given the .pyc for the file requested
> again, this works fine on my laptop which is using the same 
> OS/apache/python/mod_python
> there maybe some minor differences in apache config, but nothing that I
> know of which would affect mod_python.
> Can anyone give me a clue as to where I should try looking?

One can get wierd things like this happening if you have MultiViews
enabled and are using URLs which have no extensions.

So for starters try using:

  Options -MultiViews

in your Apache configuration and see if things change.

Also, what handler are you using, your own, mod_python.publisher
or something else? It is possible that you might be hitting one of
the issues since fixed in mod_python 3.2.


More information about the Mod_python mailing list