[mod_python] could not import mod_python.apache. ( Modpython -3.1.4 )

Hans-Joachim Ehlers HansJoachim.Ehlers at eumetsat.int
Wed Jan 11 15:52:46 EST 2006


Apache 2.0.55
Python 2.4.2
modpython -3.1.4
AIX 5.1


Doing the following steps 
1) Starting Apache as ./httpd -X ( Apache is using 'nobody' as uid &
gid 
2) Opening a page on this host  http://MyHost:/cgi-bin/mptest.py

will lead to the following entries in the apache errorlog:

[Wed Jan 11 20:19:29 2006] [notice] Apache/2.0.55 (Unix) DAV/2
mod_python/3.1.4 Python/2.4.2 configured -- resuming normal operations
[Wed Jan 11 20:19:35 2006] [error] make_obcallback: could not import
mod_python.apache.\n
'import site' failed; use -v for traceback
'import site' failed; use -v for traceback
ImportError: No module named mod_python.apache

A direct import with python show the following output
1431$ python
Python 2.4.2 (#1, Jan 11 2006, 19:56:08) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> from mod_python import apache
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py",
line 28, in ?
    import _apache
ImportError: No module named _apache

Down below is also an output from
$python -v
>>>> from mod_python import apache

BTW:
Since my pythion has been build with tkinter support - a debug version
of python will not work with mod_python at all because of something like
invaled thread .

Any hints ?
tnx
Hajo


1432$ python -v
...
>>> from mod_python import apache
import mod_python # directory
/usr/local/lib/python2.4/site-packages/mod_python
# /usr/local/lib/python2.4/site-packages/mod_python/__init__.pyc
matches /usr/local/lib/python2.4/site-packages/mod_python/__init__.py
import mod_python # precompiled from
/usr/local/lib/python2.4/site-packages/mod_python/__init__.pyc
# /usr/local/lib/python2.4/site-packages/mod_python/apache.pyc matches
/usr/local/lib/python2.4/site-packages/mod_python/apache.py
import mod_python.apache # precompiled from
/usr/local/lib/python2.4/site-packages/mod_python/apache.pyc
# /usr/local/lib/python2.4/traceback.pyc matches
/usr/local/lib/python2.4/traceback.py
import traceback # precompiled from
/usr/local/lib/python2.4/traceback.pyc
dlopen("/usr/local/lib/python2.4/lib-dynload/time.so", 2);
import time # dynamically loaded from
/usr/local/lib/python2.4/lib-dynload/time.so
# /usr/local/lib/python2.4/pdb.pyc matches
/usr/local/lib/python2.4/pdb.py
import pdb # precompiled from /usr/local/lib/python2.4/pdb.pyc
# /usr/local/lib/python2.4/cmd.pyc matches
/usr/local/lib/python2.4/cmd.py
import cmd # precompiled from /usr/local/lib/python2.4/cmd.pyc
# /usr/local/lib/python2.4/string.pyc matches
/usr/local/lib/python2.4/string.py
import string # precompiled from /usr/local/lib/python2.4/string.pyc
# /usr/local/lib/python2.4/re.pyc matches
/usr/local/lib/python2.4/re.py
import re # precompiled from /usr/local/lib/python2.4/re.pyc
# /usr/local/lib/python2.4/sre.pyc matches
/usr/local/lib/python2.4/sre.py
import sre # precompiled from /usr/local/lib/python2.4/sre.pyc
# /usr/local/lib/python2.4/sre_compile.pyc matches
/usr/local/lib/python2.4/sre_compile.py
import sre_compile # precompiled from
/usr/local/lib/python2.4/sre_compile.pyc
import _sre # builtin
# /usr/local/lib/python2.4/sre_constants.pyc matches
/usr/local/lib/python2.4/sre_constants.py
import sre_constants # precompiled from
/usr/local/lib/python2.4/sre_constants.pyc
# /usr/local/lib/python2.4/sre_parse.pyc matches
/usr/local/lib/python2.4/sre_parse.py
import sre_parse # precompiled from
/usr/local/lib/python2.4/sre_parse.pyc
dlopen("/usr/local/lib/python2.4/lib-dynload/strop.so", 2);
import strop # dynamically loaded from
/usr/local/lib/python2.4/lib-dynload/strop.so
# /usr/local/lib/python2.4/bdb.pyc matches
/usr/local/lib/python2.4/bdb.py
import bdb # precompiled from /usr/local/lib/python2.4/bdb.pyc
# /usr/local/lib/python2.4/repr.pyc matches
/usr/local/lib/python2.4/repr.py
import repr # precompiled from /usr/local/lib/python2.4/repr.pyc
dlopen("/usr/local/lib/python2.4/lib-dynload/itertools.so", 2);
import itertools # dynamically loaded from
/usr/local/lib/python2.4/lib-dynload/itertools.so
# /usr/local/lib/python2.4/pprint.pyc matches
/usr/local/lib/python2.4/pprint.py
import pprint # precompiled from /usr/local/lib/python2.4/pprint.pyc
dlopen("/usr/local/lib/python2.4/lib-dynload/cStringIO.so", 2);
import cStringIO # dynamically loaded from
/usr/local/lib/python2.4/lib-dynload/cStringIO.so
import imp # builtin
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py",
line 28, in ?
    import _apache
ImportError: No module named _apache
>>>




More information about the Mod_python mailing list