Third party library behaves differently in unreal

I solved the problem. It seems like as soon as the python script tries to print out anything from standard output/error it will crush the result. I’m guessing that output from another program running in unreal has some issues?

I solved it by redirecting the output/log to another file.