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

UnboundLocalError downloading a playlist #808

Closed
tebeka opened this issue Apr 27, 2013 · 5 comments
Closed

UnboundLocalError downloading a playlist #808

tebeka opened this issue Apr 27, 2013 · 5 comments

Comments

@tebeka
Copy link

@tebeka tebeka commented Apr 27, 2013

$ python2 --version
Python 2.7.4
$ python2 ~/Downloads/youtube-dl --version 
2013.04.22
$ python2 ~/Downloads/youtube-dl 'http://www.youtube.com/watch?v=sRArT81TVEM&list=TLqAypMIFHmmI' --prefer-free-formats -t
[youtube] PL TLqAypMIFHmmI: Downloading page #1
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/miki/Downloads/youtube-dl/__main__.py", line 18, in <module>
  File "/home/miki/Downloads/youtube-dl/youtube_dl/__init__.py", line 558, in main

  File "/home/miki/Downloads/youtube-dl/youtube_dl/__init__.py", line 542, in _real_main

  File "/home/miki/Downloads/youtube-dl/youtube_dl/FileDownloader.py", line 684, in download
  File "/home/miki/Downloads/youtube-dl/youtube_dl/FileDownloader.py", line 460, in extract_info
  File "/home/miki/Downloads/youtube-dl/youtube_dl/InfoExtractors.py", line 96, in extract
  File "/home/miki/Downloads/youtube-dl/youtube_dl/InfoExtractors.py", line 1785, in _real_extract
UnboundLocalError: local variable 'playlist_title' referenced before assignment
jaimeMF added a commit that referenced this issue Apr 27, 2013
The playlist_title wasn't initialized.
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 27, 2013

This is related to #755, the problem here is that the playlist TLqAypMIFHmmI doesn't exist. Where did you get the link?

@tebeka
Copy link
Author

@tebeka tebeka commented Apr 27, 2013

Maybe it's related to #755, however I did try to download the whole list.

I got the url from the first video I'm watching in the playlist, here's a cut&paste from the address bar - http://www.youtube.com/watch?v=sRArT81TVEM&playnext=1&list=TLqAypMIFHmmI

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 27, 2013

The problem is that the playlist seems to not exist (at least I can't access it), so youtube-dl gets an empty list.
You can download the video by running: youtube-dl http://www.youtube.com/watch?v=sRArT81TVEM

@phihag
Copy link
Contributor

@phihag phihag commented May 4, 2013

Yup, when the parameter includes a list, we assume a playlist. This is a weird edge case that now just returns an empty list. I'm closing this issue now, but feel free to comment if there's anything we can do to improve the behavior.

@phihag phihag closed this May 4, 2013
@Plaque-fcc
Copy link

@Plaque-fcc Plaque-fcc commented May 5, 2013

Hmm, what's on checking if the playlist is empty then falling back to
single video download on playlist fail?

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.

None yet
4 participants
You can’t perform that action at this time.