You could ignore the warning and focus on debugging the killed process.
To do so, run the script via gdb:
gdb --args python script.py args
...
run
...
bt

and check the backtrace to isolate the issue further.