Could you try to grab the stacktrace via:
gdb --args python script.py args
...
run
...
bt

and post it here?
PS: you can post code snippets by wrapping them into three backticks ```, which would make debugging easier.