You could try to get the backtrace using gdb via:
gdb --args python script.pt args
...
run
...
bt

This should give you the backtrace, which would point towards the failing operation and might be helpful to debug this issue further.