When your programs stops with the error, it should also be printing a stack trace. This is a list of all the functions that have been called when Python had the problem.
You shouldn't have to do anything extra to get the stack trace. -- http://mail.python.org/mailman/listinfo/python-list