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

ERROR: local variable 'ytplayer_config' referenced before assignment #4169

Closed
Albretch opened this issue Nov 12, 2014 · 2 comments
Closed

ERROR: local variable 'ytplayer_config' referenced before assignment #4169

Albretch opened this issue Nov 12, 2014 · 2 comments

Comments

@Albretch
Copy link

@Albretch Albretch commented Nov 12, 2014

$ date; youtube-dl --update
Wed Nov 12 13:40:21 EST 2014
youtube-dl is up-to-date (2014.11.12.1)

$ python --version
Python 2.7.8

$ uname -a
Linux Microknoppix 3.16.3 #12 SMP PREEMPT Fri Sep 26 04:37:20 CEST 2014 i686 GNU/Linux

...

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--proxy', '', '--max-filesize', '8192m', '--user-agent', 'NokiaC6-00/10.0.021 (SymbianOS/9.4; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebkit/525 (KHTML, like Gecko) BrowserNG/7.2.6 UNTRUSTED/1.0 3gpp-gba', '--referer', 'http://www.bing.com/search?q=youtube+Chemistry+Physics', '--no-overwrites', '--ignore-errors', '--continue', '--verbose', '--no-progress', '--console-title', '--audio-format', 'best', '--max-quality', 'mp4', '--output', '/media/sdc1/yt/%(uploader)s/%(id)s.%(ext)s', '--batch-file', '/media/sdc1/prjx/youtube/yt_urls/370_Physical_pendula00_yt.urls']
[debug] Batch file urls: [u'http://www.youtube.com/watch?v=OvDePn41fPY&hd=1', u'http://www.youtube.com/watch?v=YWQxUzyyXCE&hd=1']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2014.11.12.1
[debug] Python version 2.7.8 - Linux-3.16.3-i686-with-debian-7.6
[debug] exe versions: avconv 11-6, avprobe 11-6, ffmpeg 11-6
[debug] Proxy map: {}
�[22;0t[youtube] Confirming age
[youtube] OvDePn41fPY: Downloading webpage
[youtube] OvDePn41fPY: Downloading video info webpage
[youtube] OvDePn41fPY: Extracting video information
WARNING: unable to extract uploader nickname
WARNING: unable to extract categories; please report this issue on http://yt-dl.org/bug
ERROR: local variable 'ytplayer_config' referenced before assignment
Traceback (most recent call last):
File "/media/sdc1/yt_dl/youtube_dl/YoutubeDL.py", line 536, in extract_info
ie_result = ie.extract(url)
File "/media/sdc1/yt_dl/youtube_dl/extractor/common.py", line 199, in extract
return self._real_extract(url)
File "/media/sdc1/yt_dl/youtube_dl/extractor/youtube.py", line 958, in _real_extract
dash_manifest_url = ytplayer_config['args']['dashmpd']
UnboundLocalError: local variable 'ytplayer_config' referenced before assignment

@clampak
Copy link

@clampak clampak commented Nov 13, 2014

Do you need the --user-agent string there? It works for me when I remove it.

Some side notes:
The --max-quality refers to a numeric format code rather than an extension, you can see the choices for a specific video by using the -F switch. You're probably looking for the -f switch, e.g., -f mp4.
--audio-format is used only in conjunction with -x as far as I can tell, and is for extracting (and converting) the audio to a separate file. I don't think it has any use by itself.

I'm curious if you are actually seeing a progress bar at all. The option --no-progress trumps (for me) --console-title, so I get no progress bar either in the console or the console titlebar.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 15, 2014

As @clampak said, it works without the --user-agent option (which should only be used for debugging, youtube-dl should use the correct user agent for each site).

@jaimeMF jaimeMF closed this Nov 15, 2014
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
3 participants
You can’t perform that action at this time.