[mod_python] PyThreadState_Delete: tstate is still current

Graham Dumpleton grahamd at dscpl.com.au
Fri Oct 14 23:07:47 EDT 2005

On 15/10/2005, at 12:58 PM, Graham Dumpleton wrote:

> Python's rules for determining the default PYTHON_PATH are stupid.
> Even when loaded from inside of Apache as part of mod_python, it seems
> to search PATH for a "python" executable. If it finds one it will 
> assume
> that that is the correct one and somehow base the PYTHON_PATH on that.
> I eliminated the "init" problem by simply ensuring that the version of
> Python I used to build mod_python was the first found in my path. As it
> was it was still finding the system default version of Python which
> had mod_python 3.1.4 installed. It therefore was loading mod_python
> modules from 3.1.4 and not 3.2.2 as installed in my separate copy of
> Python.

Should clarify that I am talking about the PATH in the environment when
Apache is being started/restarted. Ie., I was stopping/starting Apache
on the command line. Thus it was my personal user PATH environment which
was inherited by the "apachectl" program that was the problem.

This issue may explain away some prior cases where people were having
lots of problems getting mod_python to pick up the correct installed 
code files for mod_python. :-(


More information about the Mod_python mailing list