ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.41k stars 10.04k forks source link

OSError: [Errno 12] Cannot allocate memory #1894

Closed JohnMcLear closed 10 years ago

JohnMcLear commented 10 years ago

This is on a Raspberry Pi

2013-12-04 22:15 VERBOSE  task          drivetv         ACCEPTED: `HOW TO MAKE A COCA-COLA CAKE` by accept_all plugin
2013-12-04 22:16 VERBOSE  details       drivetv         Summary - Accepted: 99 (Rejected: 0 Undecided: 0 Failed: 0)
2013-12-04 22:16 VERBOSE  exec          drivetv         Executing: youtube-dl -o /var/lib/transmission-daemon/downloads/'%(upload_date)s-%(stitle)s.%(ext)s' http://www.youtube.com/watch?v=98IaXcXzWas&feature=youtube_gdata
2013-12-04 22:16 ERROR    task          drivetv         BUG: Unhandled error in plugin exec: [Errno 12] Cannot allocate memory
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/FlexGet-1.1-py2.7.egg/flexget/task.py", line 365, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/FlexGet-1.1-py2.7.egg/flexget/event.py", line 21, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/FlexGet-1.1-py2.7.egg/flexget/plugins/output/exec.py", line 173, in phase_handler
    self.execute(task, 'on_' + phase, config)
  File "/usr/local/lib/python2.7/dist-packages/FlexGet-1.1-py2.7.egg/flexget/plugins/output/exec.py", line 145, in execute
    if self.execute_cmd(cmd, allow_background, config['encoding']) != 0 and config.get('fail_entries'):
  File "/usr/local/lib/python2.7/dist-packages/FlexGet-1.1-py2.7.egg/flexget/plugins/output/exec.py", line 92, in execute_cmd
    stderr=subprocess.STDOUT, close_fds=False)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1153, in _execute_child
    self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
2013-12-04 22:16 INFO     task          drivetv         Aborting task (plugin: exec)

I'm using flexget , youtube-dl and transmission to download my subscriptions to youtube.

pi@raspbmc:/home/jose$ /usr/bin/youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v']
[debug] youtube-dl version 2013.10.23.2
[debug] Python version 2.7.3 - Linux-3.10.17-armv6l-with-debian-7.2
[debug] Proxy map: {}
Usage: youtube-dl [options] url [url...]
phihag commented 10 years ago

This is an error in the FlexGet process which is raised before youtube-dl even gets to start. Most likely, check your ulimit settings and look (with htop or so) whether you have a surprising amount of processes running.