OSError:[errno2]没有这样的文件或目录,并且OSError:[Errno 12]无法分配内存

时间:2018-10-30 09:32:14

标签: python python-2.7 ffmpeg subprocess

我正在尝试使用Apache KafkaFFmpeg转换视频。我已经在系统上运行了程序,但是在服务器上运行时失败。我运行代码时遇到此错误:

Traceback (most recent call last):
  File "/home/fu/kafka/kafkaVideo/ffmpeg-python-master/ffmpeg/send.py", line 30, in <module>
    subprocess.call([sys.executable, start])
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1235, in _execute_child
    self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
frame send
frame send
frame send
frame send
...
raceback (most recent call last):
  File "/home/fu/kafka/kafkaVideo/ffmpeg-python-master/ffmpeg/send.py", line 30, in <module>
    subprocess.call([sys.executable, start])
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1235, in _execute_child
    self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
frame send
frame send
...
Traceback (most recent call last):
  File "send.py", line 107, in <module>
    publish_video(video_path)
  File "send.py", line 48, in publish_video
    subprocess.call([sys.executable, start])
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)``
OSError: [Errno 2] No such or directory

但是错误的第三部分在不同的调试中是不同的

0 个答案:

没有答案