Have you tried stepping through the execution with...
# python
g
Have you tried stepping through the execution with something like pdb?