Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to show stack traces or at least some sort of errors rendered to the HTML response while using a WSGI script. A ModuleNotFound exception is raised when I tried to import a module the script can't seem to find (which is fine for now), but all that is reported in the HTTP response is a rather vague Internal Server Error status 500 error which looks like Apache's work.

How can I get a stack trace to show up?

Other information: I'm using Windows Server for this with Apache 2.2 (standalone, non-WAMP) as a service and CherryPy 3.2.2. I am using another machine on the same local network to edit the script through network sharing; I am unfamiliar with remote WSGI debugging, but if someone knows how to debug this without having to rely on apache's error logs, I'd love some suggestions. I've tried lots of configuration options for CherryPy to no avail, so I'd love to hear if anyone is familiar with exactly this.

Please let me know if you have any ideas; thanks!

share|improve this question

Next time just add:


to your cherrypy configuration setting.

share|improve this answer
up vote 0 down vote accepted

It was as simple as cleverly wrapping everything in a big try/except and including modules inside of the main reply function (yucky) and replying with a string formatted version of an exception.

Needless to say I ultimately ended up making a Django project for this (probably for the best).

Django gets the job done and then some.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.