No data retrieved with AGI

Same old problem as before — Asterisk redirecting stderr to /dev/null, so you cannot see any error messages?

You can redirect it back to somewhere sensible by putting something like this near the top of your code (choose any suitable filename/directory):

log = open("/tmp/agi_try.log", "w")
os.dup2(log.fileno(), 2)
log.close()
del log

Now you have a file which should hopefully contain some clues after your program dies.

Another option is to use FastAGI. That way you run your own process, and you get to control where all its I/O goes.