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

Closed
opened 2026-02-20 23:22:37 -05:00 by deekerman · 2 comments
Owner

Originally created by @Albretch on GitHub (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: {}
[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

Originally created by @Albretch on GitHub (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: {} [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
Author
Owner

@clampak commented on GitHub (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.

@clampak commented on GitHub (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.
Author
Owner

@jaimeMF commented on GitHub (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 commented on GitHub (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).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#3412
No description provided.