Я пытаюсь создать асинхронный канал c, который можно использовать для взаимодействия с подпроцессом, который я создаю. У меня проблемы с файлом не найдена ошибка при попытке создать процесс. Как вы можете видеть в приведенном ниже коде, я могу нормально создать подпроцесс, используя обычный Popen
синхронно. Может кто-нибудь помочь мне выйти за рамки этой ошибки?
Код:
# I've created the command and args string/dictionary above. They are all valid.
# I can run the command from the command line and it works
import pprint
pp = pprint.PrettyPrinter().pprint
pp(popen_params)
print(" ".join(cmd))
sp.Popen(cmd, **popen_params)
print("Made it past initially creating the pipe")
self.async_proc = self.loop.run_until_complete(asyncio.create_subprocess_exec(" ".join(cmd), **popen_params))
Вывод:
{'bufsize': 0, 'stderr': -1, 'stdin': -3, 'stdout': -1}
/usr/local/bin/ffmpeg -i /Users/OWNER/Google Drive/yolo.mp4 -loglevel error -f image2pipe -vf scale=1280:720 -sws_flags bicubic -pix_fmt rgb24 -vcodec rawvideo -
Made it past initially creating the pipe
Traceback (most recent call last):
File "movie_trial.py", line 97, in <module>
clip = VideoFileClip("/Users/OWNER/Google Drive/yolo.mp4")
File "/Users/OWNER/Documents/Projects/moivepy_vendoring/moviepy/video/io/VideoFileClip.py", line 94, in __init__
loop=self.loop)
File "/Users/OWNER/Documents/Projects/moivepy_vendoring/moviepy/video/io/ffmpeg_reader.py", line 72, in __init__
self.async_initialize()
File "/Users/OWNER/Documents/Projects/moivepy_vendoring/moviepy/video/io/ffmpeg_reader.py", line 119, in async_initialize
self.async_proc = self.loop.run_until_complete(asyncio.create_subprocess_exec(" ".join(cmd), **popen_params))
File "/anaconda3/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/anaconda3/lib/python3.6/asyncio/subprocess.py", line 225, in create_subprocess_exec
stderr=stderr, **kwds)
File "/anaconda3/lib/python3.6/asyncio/base_events.py", line 1211, in subprocess_exec
bufsize, **kwargs)
File "/anaconda3/lib/python3.6/asyncio/unix_events.py", line 200, in _make_subprocess_transport
**kwargs)
File "/anaconda3/lib/python3.6/asyncio/base_subprocess.py", line 39, in __init__
stderr=stderr, bufsize=bufsize, **kwargs)
File "/anaconda3/lib/python3.6/asyncio/unix_events.py", line 706, in _start
universal_newlines=False, bufsize=bufsize, **kwargs)
File "/anaconda3/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/anaconda3/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/ffmpeg -i /Users/OWNER/Google Drive/yolo.mp4 -loglevel error -f image2pipe -vf scale=1280:720 -sws_flags bicubic -pix_fmt rgb24 -vcodec rawvideo -': '/usr/local/bin/ffmpeg -i /Users/OWNER/Google Drive/yolo.mp4 -loglevel error -f image2pipe -vf scale=1280:720 -sws_flags bicubic -pix_fmt rgb24 -vcodec rawvideo -'