mod_python/'import site' failed

Martin Sandin msandin at remove_this.hotmail.com
Thu Jan 18 11:41:32 EST 2001


In article <3A66D7EE.795D5F45 at mail.dvz.fh-koeln.de>,
  Stephan Effelsberg <b012414 at mail.dvz.fh-koeln.de> wrote:

> Apart from 'ordinary' modules, site.py is a very special module for
handling
> OS-specific imports of 3rd party modules (e.g. look if you have *.pth
files in
> your Python directory, they are read by this module) and adjusting
sys.path, it
> is imported automatically during startup.
> A failed import of this module also causes this special error message, not
the
> usual ImportError. It seems that you either don't have the file site.py
(or
> site.pyc) or Python is not able to locate it.
> A failed import of 'site' is no reason for Python to quit, you're simply
not
> able to locate some specific modules. That's the reason why Apache tells
you
> that Python is running, because it is really doing so.
> Conclusion: either Python is not installed correctly or Apache is able to
> modify the way Python works (but don't ask me how in particular, I'm not
an
> Apache expert).
>
>

Thanks for your answer, most informative. Let's see if I can provide another
piece of information as I've unfortunatly not managed to actually solve my
problem.

What could be the reason for Python20 not finding site.py?

Python runs fine in all normal cases (started from the python(w).exe) and is
on PATH. site.py (and site.pyc) is in the lib/ directory under the main
python directory. Python might well be running, but when trying to access a
page Apache will log this error:

[Thu Jan 18 10:20:10 2001] [error] [client 194.x.x.x] python_handler:
make_obcallback returned no obCallBack!


The 'import site failed' error persists if I remove all Python references
but the load module directive from httpd.conf.


Anyone got any ideas?


-
Martin
come.to/vague





More information about the Python-list mailing list