You are sure that your script is using the python3 and no the old python2? Can you show the script how it looks like.