[mod_python] sporadic import errors...

Chris Anderson cva_ at yahoo.com
Mon Dec 17 12:42:31 EST 2001


okay, i'm running Python 2.1.1, mod_python 2.7.6, and apache 1.3.19
under Linux 2.2.14. the mod_python module is build statically.

after hitting our app a couple of times, i sporadically receive the
following error:

'import site' failed; traceback:
Traceback (most recent call last):
  File "/usr/local/lib/python2.1/site.py", line 60, in ?
    import sys, os
  File "/usr/local/lib/python2.1/os.py", line 54, in ?
    __all__.extend(_get_exports_list(posix))
  File "/usr/local/lib/python2.1/os.py", line 35, in _get_exports_list
    return list(module.__all__)
AttributeError: 'posix' module has no attribute '__all__'
make_obcallback(): could not import mod_python.apache.
make_obcallback(): could not call init.

and i'm having a terrible time isolating what could be causing this to
occur.

interesting things which could be related:

o multiple instances of the app are running under the same apache with
different <Directory> tags handling the different apache/mod_python
settings

o i have PythonInterpPerDir turned on

o the problem seems most easily exaccerbated by running multiple
scripts simultaneously

the biggest problem i'm having (besides the error itself) is that i
can't figure out any way to tell which subinterpreter i am in when
these errors happen. i've poked through the documentation and
pythonrun.c to no avail.

any tips would be most helpful.

cva

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com



More information about the Mod_python mailing list