[mod_python] How do I troubleshoot a 500 Internal Server Error?

Graham Dumpleton grahamd at dscpl.com.au
Fri Mar 31 00:22:51 EST 2006


Alberto Ruiz wrote ..
> I'm getting a very wierd error when I call my python script.  Other
> Python scripts seem to work fine but one in particular returns a 500
> server error and the error does not show in the error-log under the
> virtual domain that I'm working on but on the main error-log.  How can
> I
> get additional debugging information to find out the problem?
> 
> In the error-log I get the following:
> mod_python: (Re)importing mod_python.publisher from None

In mod_python 2.7.11, this message possibly doesn't mean much.

> When I run my python script I get the following:
> 
> HTTP/1.1 500 Internal Server Error
> Date: Fri, 31 Mar 2006 04:46:55 GMT
> Server: Apache/1.3.33 (Unix) PHP/4.4.2 mod_python/2.7.11 Python/2.4.2
> mod_perl/1.29
> Connection: close
> Transfer-Encoding: chunked
> Content-Type: text/html; charset=iso-8859-1
> 
> 262
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>500 Internal Server Error</TITLE>
> </HEAD><BODY>
> <H1>Internal Server Error</H1>
> The server encountered an internal error or
> misconfiguration and was unable to complete
> your request.<P>
> Please contact the server administrator,
>  root at mydomain.com and inform them of the time the error occurred,
> and anything you might have done that may have
> caused the error.<P>
> More information about this error may be available
> in the server error log.<P>
> <HR>
> <ADDRESS>Apache/1.3.33 Server at mydomain.com Port 80</ADDRESS>
> </BODY></HTML>
> 
> 0

This message in mod_python 2.7.11 with no message in error log
generally means that your published function doesn't return anything.

Can you post the most minimal publisher function which shows the
problem?

Graham


More information about the Mod_python mailing list