OSError: [Errno 2] Keine solche Datei oder Verzeichnis bei Verwendung des Python-Unterprozesses in Django

| | | | |

Ich versuche, ein Programm auszuführen, um einige Systemaufrufe innerhalb von Python-Code mit subprocess.call() auszuführen, was den folgenden Fehler ausgibt:

Traceback (most letzter Aufruf letzter): Datei "<console>", Zeile 1, in <module> Datei „/usr/lib/python2.7/subprocess.py“, Zeile 493, im Aufruf Popen(*popenargs, **kwargs).wait() Datei „/usr/lib/python2.7/subprocess.py“ , Zeile 679, in __init__ errread, errwrite) Datei "/usr/lib/python2.7/subprocess.py", Zeile 1249, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory 

Mein aktueller Python-Code lautet wie folgt:

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) rotation = "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) #Systemaufrufe: subprocess.call(crop) 

Kann ich relevante Ratschläge zur Lösung dieses Problems erhalten?

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

News


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method