Estou tentando executar um programa para fazer algumas chamadas de sistema dentro do código Python usando subprocess.call()
que gera o seguinte erro:
Traceback (mais última chamada recente): Arquivo "<console>", linha 1, em <module> Arquivo "/usr/lib/python2.7/subprocess.py", linha 493, na chamada return Popen(*popenargs, **kwargs).wait() Arquivo "/usr/lib/python2.7/subprocess.py" , linha 679, em __init__ errread, errwrite) Arquivo "/usr/lib/python2.7/subprocess.py", linha 1249, em _execute_child raise child_exception OSError: [Errno 2] No such file or directory
Meu código Python real é o seguinte:
url = "/media/videos/3cf02324-43e5-4996-bbdf-6377df448ae4.mp4" real_path = "/home/chanceapp /webapps/chanceapp/chanceapp"+url fake_crop_path = "/home/chanceapp/webapps/chanceapp/chanceapp/fake1"+url fake_rotate_path = "/home/chanceapp/webapps/chanceapp.chanceapp/fake2"+url crop = "ffmpeg - i %s -vf "%(real_path)+"crop=400:400:0:0 "+ "-strict -2 %s"%(fake_crop_path) girar = "ffmpeg -i %s -vf "%(fake_crop_path) +"transpose=1 "+"%s"%(fake_rotate_path) move_rotated = "mv"+" %s"%(fake_rotate_path)+" %s"%(real_path) delete_cropped = "rm "+"%s"%( fake_crop_path) #chamadas do sistema: subprocess.call(crop)
Posso obter alguns conselhos relevantes sobre como resolver isso?