Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

could not import mod_python.apache

519 views
Skip to first unread message

Michael Hoffmann

unread,
Jul 15, 2002, 10:39:48 AM7/15/02
to
Hi,
I've the folowing Error when I try to run my pythonscript:

make_obcallback(): could not import mod_python.apache.
make_obcallback(): could not call init.
[Mon Jul 15 16:12:46 2002] [error] [client 62.226.50.138] python_handler:
make_obcallback returned no obCallBack!


but httpd start is ok:
[Mon Jul 15 16:14:54 2002] [notice] Apache/1.3.19 (Unix) (SuSE/Linux)
mod_python/2.7.2 Python/2.0 mod_ssl/2.8.3 OpenSSL/0.9.6a PHP/4.0.6
mod_perl/1.25 mod_th
rottle/3.0 mod_layout/1.0 mod_fastcgi/2.2.2 mod_dtcl configured -- resuming
normal operations
[Mon Jul 15 16:14:54 2002] [notice] suEXEC mechanism enabled (wrapper:
/usr/sbin/suexec)

The directives are:

<Directory /home/www/web2/html/testweb>
AddHandler python-program .py
PythonHandler mptest
PythonDebug on
</Directory>
<Directory "/home/www/web2/html">
Options +ExecCGI
</Directory>

the script ist:

from mod_python import apache

def handler(req):
req.content_type = "text/plain"
req.send_http_header ()
req.write ("Hello World!")
return apache.OK

any Idea?????

Regards Michael


Michael Hoffmann

unread,
Jul 15, 2002, 10:40:43 AM7/15/02
to

Michael Hoffmann

unread,
Jul 15, 2002, 10:40:49 AM7/15/02
to

Michael Hoffmann

unread,
Jul 15, 2002, 10:44:01 AM7/15/02
to
Uppps,
sorry for this much postings, that OE6 with Error can't send, but it was
sending,
*great Billy* :-0

Michael


Gerhard Häring

unread,
Jul 15, 2002, 1:36:21 PM7/15/02
to
* Michael Hoffmann <m...@esh-online.de> [2002-07-15 16:39 +0200]:

> Hi,
> I've the folowing Error when I try to run my pythonscript:
>
> make_obcallback(): could not import mod_python.apache.

In my experience, this is the single most often experienced problem with
mod_python: For some reason your "make install" step didn't put the
mod_python support modules into the right places.

You could try to fix this manually: the directory lib/python/mod_python
in the mod_python source distribution should go into the site-packages
directory of the Python you compiled it against.

I'd also recommend to ask on the mod_python mailinglist in the future,
as that's where the people who're using it hang out.

Gerhard
--
This sig powered by Python!
Außentemperatur in München: 21.4 °C Wind: 4.7 m/s


Michael Hoffmann

unread,
Jul 15, 2002, 3:16:49 PM7/15/02
to
Hi Gerhard,
but I've used the original RPMs from SuSE ...

Michael

"Gerhard Häring" <gerhard...@gmx.de> schrieb im Newsbeitrag
news:mailman.102675472...@python.org...

Gerhard Häring

unread,
Jul 15, 2002, 11:37:57 PM7/15/02
to
* Michael Hoffmann <m...@esh-online.de> [2002-07-15 21:16 +0200]:

> "Gerhard Häring" <gerhard...@gmx.de> wrote:
> > * Michael Hoffmann <m...@esh-online.de> [2002-07-15 16:39 +0200]:
> > > Hi,
> > > I've the folowing Error when I try to run my pythonscript:
> > >
> > > make_obcallback(): could not import mod_python.apache.
> >
> > You could try to fix this manually: the directory lib/python/mod_python
> > in the mod_python source distribution should go into the site-packages
> > directory of the Python you compiled it against.
>
> Hi Gerhard,
> but I've used the original RPMs from SuSE ...

I wouldn't be surprised if these were broken. IIRC SuSE had a seperate
RPM called python-nothreads or similar that is required by mod_python. I
can't really help much, as I don't use SuSE any more. But my suggestion
to ask on the mod_python mailing list still stands.

If you have indeed installed both the mod_python and the python-nothread
RPMs and you're getting this error, then the SuSE mod_python RPMs are
most probably buggy. I suggest building both from source yourself, then.

Gerhard
--
This sig powered by Python!

Außentemperatur in München: 17.7 °C Wind: 2.8 m/s


0 new messages