Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--extract-audio option not working anymore #470

Closed
reyesr opened this issue Oct 15, 2012 · 7 comments
Closed

--extract-audio option not working anymore #470

reyesr opened this issue Oct 15, 2012 · 7 comments
Assignees

Comments

@reyesr
Copy link

@reyesr reyesr commented Oct 15, 2012

Having a functional youtube-dl with extract-audio opions, working fine. At some point, stopped working, prolly due to change from youtube.
Did: youtube-dl -U for an update (as I do usually).
Now: youtube-dl works fine when downloading a video, but fails with extract audio option
Example:

youtube-dl --extract-audio -o "%(title)s.%(ext)s" http://www.youtube.com/watch?v=Ngag_t5Vdlw

Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/main.py", line 7, in
File "/usr/bin/youtube-dl/init.py", line 548, in main
File "/usr/bin/youtube-dl/init.py", line 518, in _real_main
File "/usr/bin/youtube-dl/PostProcessor.py", line 70, in init
File "/usr/bin/youtube-dl/PostProcessor.py", line 81, in detect_executables
File "/usr/bin/youtube-dl/PostProcessor.py", line 81, in
File "/usr/bin/youtube-dl/PostProcessor.py", line 76, in executable
AttributeError: 'module' object has no attribute 'check_output'

Python version is 2.6.5, running on debian squeeze/sid.
youtube-dl version is 2012.10.09

Any idea?

@Tailszefox
Copy link
Contributor

@Tailszefox Tailszefox commented Oct 15, 2012

It seems Python 2.6.5 subprocess object doesn't have a check_output function. It's a new function from Python 2.7 onwards, which is why it's failing when using a lower version. The way around it would be to use the Popen object and communicate with it, though there may be other ways.

In the meantime, you can upgrade to Python 2.7 if it's possible, that should solve the issue.

EDIT : Quick fix that seems to be working with both Python 2.6 and 2.7. Not tested on Windows though, but it should work as well.

@phihag
Copy link
Contributor

@phihag phihag commented Oct 15, 2012

The quick fix is not identical to the old semantics, but we can simply port check_output from cpython.

@jsmaniac
Copy link

@jsmaniac jsmaniac commented Oct 29, 2012

Note that 2012.10.09 is still the current compiled version when doing a git pull, one has to use:

youtube_dl/__main__.py --extract-audio 'http://blahblah'
@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Oct 30, 2012

We will push a new version soon. Anyway, the issue is resolved in the code? Closing?

@Tailszefox
Copy link
Contributor

@Tailszefox Tailszefox commented Oct 30, 2012

Yep, fixed in 073522b!

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Oct 30, 2012

Great! (Thanks @Tailszefox for all the help around here 😃)

@Tailszefox
Copy link
Contributor

@Tailszefox Tailszefox commented Oct 30, 2012

No problem, I figured that since I use youtube-dl pretty much every day I might as well help with whatever I can!

phihag added a commit that referenced this issue Jan 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants
You can’t perform that action at this time.