import gadfly causes 500 Server Error -- anyone know how to fix?
Robin Becker
robin at jessikat.fsnet.co.uk
Sun Mar 10 03:29:06 EST 2002
In article <3C8AFB43.275714BB at erols.com>, Jerry Gitomer
<jgitomer at erols.com> writes
.....
>
>500 Server Error
>
>The server encountered an internal error and could not complete
>your request.
.....
you should probably have a general mechanism at the highest level to
trap any uncaught errors.
Eg in your top level script you should have something that prints out
the traceback.
typically
try:
print getresult()
except:
print "content-type: text/html"
print
print "<html><head><title></title></head><body>"
print "<h1>An Error Occurred.</h1>"
print "<pre>"
import traceback
traceback.print_exc()
print "</pre>"
print "</body></html>"
any error in the whole process wil result in a traceback being produced.
In this case I suspect that gadfly is not importable in the runing
context. To discover why you can import sys and print out sys.path etc
in the sectuon after the print "<pre>" above.
--
Robin Becker
More information about the Python-list
mailing list