[mod_python] Error

Graham Dumpleton graham.dumpleton at gmail.com
Tue May 22 19:36:13 EDT 2007


On 23/05/07, Idoia Villacián Zárate <fidita48 at hotmail.com> wrote:

>  I compile the program and I get this error:
>
>
>
> Traceback (most recent call last):
>   File "C:\Archivos de programa\Apache Software
> Foundation\Apache2.2\htdocs\mptest.py", line 1, in
> -toplevel-
>     from mod_python import apache
>   File
> "C:\Python24\Lib\site-packages\mod_python\apache.py", line
> 30, in -toplevel-
>     import _apache
> ImportError: No module named _apache

As Jim points out, you can't run this script from the command line. Is
that what you are doing, or is the error message actually from out of
the Apache error log file when you try and access it by the
appropriate URL?

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.

Graham



More information about the Mod_python mailing list