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

[Broken] ERROR: local variable 'ytplayer_config' referenced before assignment #10

Closed
5 tasks done
jbruchon opened this issue Jan 8, 2021 · 2 comments
Closed
5 tasks done

Comments

@jbruchon
Copy link
Contributor

jbruchon commented Jan 8, 2021

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dlc version 2021.01.07-1
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

Y:\YouTube Channels\Misc>youtube-dl --match-filter "!is_live & !live" --cookies "Y:\cookies.txt" --add-metadata --write-description --write-info-json --write-thumbnail --download-archive "Y:\ytdl_archive.txt" --all-subs -ciw -o "%(title)s.%(ext)s" -v https://www.youtube.com/watch?v=_WTBkj8gFfI
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--match-filter', '!is_live & !live', '--cookies', 'Y:\\cookies.txt', '--add-metadata', '--write-description', '--write-info-json', '--write-thumbnail', '--download-archive', 'Y:\\ytdl_archive.txt', '--all-subs', '-ciw', '-o', '%(title)s.%(ext)s', '-v', 'https://www.youtube.com/watch?v=_WTBkj8gFfI']
[debug] Loading archive file 'Y:\\ytdl_archive.txt'
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dlc version 2021.01.07
[debug] Python version 3.9.0 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev, ffprobe 4.3.1-2020-11-19-full_build-www.gyan.dev
[debug] Proxy map: {}
[youtube] _WTBkj8gFfI: Downloading webpage
[youtube] _WTBkj8gFfI: Downloading embed webpage
[youtube] _WTBkj8gFfI: Refetching age-gated info webpage
[youtube] {18} signature length 104, html5 player 9f996d3e
[youtube] {22} signature length 108, html5 player 9f996d3e
[youtube] {137} signature length 108, html5 player 9f996d3e
[youtube] {248} signature length 104, html5 player 9f996d3e
[youtube] {136} signature length 108, html5 player 9f996d3e
[youtube] {247} signature length 108, html5 player 9f996d3e
[youtube] {135} signature length 104, html5 player 9f996d3e
[youtube] {244} signature length 108, html5 player 9f996d3e
[youtube] {134} signature length 108, html5 player 9f996d3e
[youtube] {243} signature length 104, html5 player 9f996d3e
[youtube] {133} signature length 108, html5 player 9f996d3e
[youtube] {242} signature length 104, html5 player 9f996d3e
[youtube] {160} signature length 108, html5 player 9f996d3e
[youtube] {278} signature length 108, html5 player 9f996d3e
[youtube] {140} signature length 108, html5 player 9f996d3e
[youtube] {249} signature length 108, html5 player 9f996d3e
[youtube] {250} signature length 108, html5 player 9f996d3e
[youtube] {251} signature length 108, html5 player 9f996d3e
ERROR: local variable 'ytplayer_config' referenced before assignment
Traceback (most recent call last):
  File "youtube_dlc\YoutubeDL.py", line 866, in wrapper
  File "youtube_dlc\YoutubeDL.py", line 887, in __extract_info
  File "youtube_dlc\extractor\common.py", line 533, in extract
  File "youtube_dlc\extractor\youtube.py", line 2375, in _real_extract
UnboundLocalError: local variable 'ytplayer_config' referenced before assignment

Description

This code path allows execution to continue without setting ytplayer_config: https://github.com/pukkandan/yt-dlc/blob/master/youtube_dlc/extractor/youtube.py#L1746-L1766

@pukkandan
Copy link
Member

The issue was introduced by 29f7c58. I have pushed a patch to fix it

@jbruchon
Copy link
Contributor Author

jbruchon commented Jan 8, 2021

Thanks, that's what I was about to commit before I got distracted by "real work" 👍 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants