[mod_python] Error

Graham Dumpleton graham.dumpleton at gmail.com
Wed May 23 18:25:42 EDT 2007


On 24/05/07, Idoia Villacián Zárate <fidita48 at hotmail.com> wrote:
> I install apache, then python and later mod_phython and all intalls
> correctly, I read mod_python's tutorial and there I have the lines I have to
> write in apache's configuration file. After doing this when I restart apache
> everything goes ok. Untill here everything goes fine
>
> I continue reading the tutorial and there is an example of what I have to do
> to get Hello World!. I copy it exactly as is written in the phyton:

Perhaps go and read the email I sent to you instead and supply the
information that was requested of you, specifically I said:

"""If it is from the Apache error log file, then please provide more
output from the log file from before this error to give us context. If
it is truly mod_python that is getting triggered then the log file
will show other messages before this point that will confirm it. If
those lines aren't there, then your script may not be getting executed
by mod_python but in some CGI like manner which would account for the
error."""

You still haven't done this.

Also, don't create new messages every time you send to the mailing
list, instead use 'reply-all' so the followups are properly connected
to the original thread, else it just makes it harder to find the
information from your previous messages.

So go back now and copy the dozen lines either side of that error
message from your Apache error log file and post it to the list as
requested. Without this context we can't verify you are actually
triggering mod_python and not just CGI.

Graham


> from mod_python import apache
>
>
>
> def handler(req):
>
>         req.content_type = 'text/plain'
>
>         req.write("Hello World!")
>
>         return apache.OK
>
>
>
>
>
> So now, when I compile this program is when I get the error:
>
> Traceback (most recent call last):
>
>   File "C:\Archivos de programa\Apache Software
> Foundation\Apache2.2\htdocs\mptest.py", line 1, in ?
>
>     from mod_python import apache
>
>   File
> "C:\Python24\Lib\site-packages\mod_python\apache.py", line
> 30, in ?
>
>     import _apacheImportError: No module named _apache
>
>
> Do you know what can be the problem?



More information about the Mod_python mailing list