Print what you are passing may be something is wrong.
Second try giving try catch in python and have a result so that may be if python is failing it might be caught and given as a output
Also check inner exception details in locals panel which might give some info about what happened
Cheers