Addedum - [mod_python] could not import mod_python.apache.

Graham Dumpleton grahamd at dscpl.com.au
Wed Jan 11 18:26:36 EST 2006


Graham Dumpleton wrote ..
> Hans-Joachim Ehlers wrote ..
> > TRUSS output 
> > I did a 
> > $ export PYTHONPATH=/usr/local
> 
> That seems to be a strange location to be setting PYTHONPATH to.
> 
> > $ truss -f  "./bin/httpd -XA
> > 
> > If you take a look at the long output from truss you will see:
> > 
> > open("/usr/local/lib/python2.4/lib-dynload/time.so", O_RDONLY) = 9
> > 2506852:        kioctl(9, 22528, 0x00000000, 0x00000000)        Err#25
> > ENOTTY
> > 
> > Does that mean: That the system is not able to load the program 'time.so'
> > from the python installation ?
> 
> No. the open() call is succeeding quite happily as it returns a file descriptor
> number. The following line is about something else.

Well, that line in itself doesn't show a problem, but latter:

+21554  2506852:        kwrite(2, " I m p o r t E r r o r", 11)         = 11
+21555  2506852:        kwrite(2, " :  ", 2)                            = 2
+21556  2506852:        kwrite(2, " E x e c   f o r m a t  ".., 17)     = 17

possibly does for time.so import.

I think you were using mod_python 3.1.X. Suggest you get down mod_python 3.2
which does a better job of ensuring Python errors which occur during startup are
flushed to the Apache log.

That or turn on verbose mode for your trace tool for write date on file descriptor 2.
Ie., stderr. Then you might see what the full error is. Then track down what the
error message means when Python generates it.

Graham


More information about the Mod_python mailing list