My script works perfectly in record and run mode. But when I run it as compiled and run as ".exe", I get such an error "Script finished with error : SyntaxError: Parse error during execution".
Try printing ( with log) the command you are trying to execute, run it in a seperate command line to see if it's working properly.
since it's related to input I am suspecting the problem is with the youtube url you are providing