Python Scripts and Internal Serice Errors

April 26th, 2006

I hate get internal server errors and not knowing what the problem actually is when I run my python scripts. Here are some tips to avoid these undescriptive errors.

1. Make sure your permissions are correct.
2. Include this at the top of every script:
#!/usr/bin/python
import cgitb; cgitb.enable();
–this library will give you a traceback of the error instead of an internal service error.
3. Make sure to typecheck your python scripts in idle. These types of errors will still give internal service errors even if you include the traceback library.


Leave a Reply