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
У вас до этого действия - нет обернутого в ошибку действия - объекта такого нет - вот он и не может его прочитать. Оберните в ошибку например кликнуть по элементу.
I managed to do it by splitting the proxy and port in to there own variables and adding the : in the proxy mod [[PROXY]]:[[PORT]] which pulled the proxy and port back together, i`ll try what you've suggested too.