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

[SBS (Australia)] SBS InfoExtractor broken on py3.7 #7410

Closed
9 of 11 tasks
Vangelis66 opened this issue Jun 24, 2023 · 2 comments
Closed
9 of 11 tasks

[SBS (Australia)] SBS InfoExtractor broken on py3.7 #7410

Vangelis66 opened this issue Jun 24, 2023 · 2 comments
Labels
bug Bug that is not site-specific

Comments

@Vangelis66
Copy link

Vangelis66 commented Jun 24, 2023

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

SBS targets Australia, however the sbsIE can be used internationally 😜

Provide a description that is worded well enough to be understood

While I was troubleshooting and commenting on an SBS related upstream issue 😉, I switched over to yt-dlp to check how it handles that same SBS URI; I was already on the latest nightly version available at this time; but, my system is 32-bit and thus I'm using (Windows) binary yt-dlp_x86.exe, built on py3.7; I was greeted with what appears to be a Python-related ERROR:

yt-dlp -F "https://www.sbs.com.au/ondemand/watch/2208035907943" => 

[SBS] Extracting URL: https://www.sbs.com.au/ondemand/watch/2208035907943
[SBS] 2208035907943: Downloading SMIL file
[SBS] 2208035907943: Downloading m3u8 information
[SBS] 2208035907943: Downloading JSON metadata
[SBS] 2208035907943: Downloading JSON metadata
ERROR: unhashable type: 'dict'

Full verbose log will be posted below, inside the template's dedicated field...

To indeed verify the issue is specific to py3.7, I downloaded latest "nightly" file yt-dlp from here and then launched it on py3.8.16 (32-bit):

python yt-dlp -F "https://www.sbs.com.au/ondemand/watch/2208035907943" => 

[SBS] Extracting URL: https://www.sbs.com.au/ondemand/watch/2208035907943
[SBS] 2208035907943: Downloading SMIL file
[SBS] 2208035907943: Downloading m3u8 information
[SBS] 2208035907943: Downloading JSON metadata
[SBS] 2208035907943: Downloading JSON metadata
[info] Available formats for 2208035907943:
ID       EXT RESOLUTION FPS |   FILESIZE   TBR PROTO | VCODEC      ACODEC
----------------------------------------------------------------------------
hls-439  mp4 398x224     25 | ~157.23MiB  439k m3u8  | avc1.4D401E mp4a.40.2
hls-870  mp4 640x360     25 | ~311.70MiB  871k m3u8  | avc1.4D401E mp4a.40.2
hls-1419 mp4 1024x576    25 | ~508.00MiB 1419k m3u8  | avc1.4D4029 mp4a.40.2
hls-1981 mp4 1280x720    25 | ~709.13MiB 1981k m3u8  | avc1.4D4029 mp4a.40.2

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

yt-dlp -vUF "https://www.sbs.com.au/ondemand/watch/2208035907943" => 

[debug] Command-line config: ['--ffmpeg-location', '..\\FFmpeg', '--downloader-args', 'ffmpeg:-v 8 -stats', '-vUF', 'https://www.sbs.com.au/ondemand/watch/2208035907943']
[debug] Encodings: locale cp1253, fs utf-8, pref cp1253, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version nightly@2023.06.22.192521 [e59e20744] (win_x86_exe)
[debug] Python 3.7.9 (CPython x86 32bit) - Windows-Vista-6.0.6003-SP2 (OpenSSL 1.1.1g  21 Apr 2020)
[debug] exe versions: ffmpeg n6.1-dev-1252-N-111136-gf66e186 (setts), ffprobe n6.1-dev-1252-N-111136-gf66e186, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Extractor Plugins: AGB+NSIG (YoutubeIE)
[debug] Plugin directories: ['<redacted>\\yt-dlp-plugins\\YTAgeGateBypass.zip\\yt_dlp_plugins', '<redacted>\\yt-dlp-plugins\\YTNSigProxy.zip\\yt_dlp_plugins']
[debug] Loaded 1851 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version: nightly@2023.06.22.192521, Current version: nightly@2023.06.22.192521
Current Build Hash: c62b3e95b948ac7cc35fb5099b4a02bae1d425f2e5eb5f3647eb004d3faf4f0b
yt-dlp is up to date (nightly@2023.06.22.192521)
[debug] Using fake IP 1.130.6.141 (AU) as X-Forwarded-For
[SBS] Extracting URL: https://www.sbs.com.au/ondemand/watch/2208035907943
[SBS] 2208035907943: Downloading SMIL file
[SBS] 2208035907943: Downloading m3u8 information
[SBS] 2208035907943: Downloading JSON metadata
[SBS] 2208035907943: Downloading JSON metadata
ERROR: unhashable type: 'dict'
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1555, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1631, in __extract_info
  File "yt_dlp\extractor\common.py", line 708, in extract
  File "yt_dlp\extractor\sbs.py", line 143, in _real_extract
TypeError: unhashable type: 'dict'
@Vangelis66 Vangelis66 added site-bug Issue with a specific website triage Untriaged issue labels Jun 24, 2023
@bashonly bashonly added the bug Bug that is not site-specific label Jun 25, 2023
@pukkandan pukkandan removed site-bug Issue with a specific website triage Untriaged issue labels Jun 25, 2023
@pukkandan
Copy link
Member

Apparently, dict.get is unhashable in 3.7 😕

>>> {{}.get}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'dict'

Wrapping it in a lambda works

>>> {lambda x: {}.get(x)}
{<function <lambda> at 0x000001E7E5CE4318>}

@Vangelis66
Copy link
Author

... Can confirm the issue is fixed on my side, too, with latest "nightly" yt-dlp_x86.exe build:

yt-dlp -vUF "https://www.sbs.com.au/ondemand/watch/2208035907943" => 

<redacted>
[debug] yt-dlp version nightly@2023.06.26.105045 [91302ed34] (win_x86_exe)
[debug] Python 3.7.9 (CPython x86 32bit) - Windows-Vista-6.0.6003-SP2 (OpenSSL 1.1.1g  21 Apr 2020)
<redacted>
[debug] Loaded 1852 extractors
<redacted>
yt-dlp is up to date (nightly@2023.06.26.105045)
[debug] Using fake IP 1.158.186.224 (AU) as X-Forwarded-For
[SBS] Extracting URL: https://www.sbs.com.au/ondemand/watch/2208035907943
[SBS] 2208035907943: Downloading SMIL file
[SBS] 2208035907943: Downloading m3u8 information
[SBS] 2208035907943: Downloading JSON metadata
[SBS] 2208035907943: Downloading JSON metadata
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[info] Available formats for 2208035907943:
ID       EXT RESOLUTION FPS |   FILESIZE   TBR PROTO | VCODEC      ACODEC
----------------------------------------------------------------------------
hls-439  mp4 398x224     25 | ~157.23MiB  439k m3u8  | avc1.4D401E mp4a.40.2
hls-870  mp4 640x360     25 | ~311.70MiB  871k m3u8  | avc1.4D401E mp4a.40.2
hls-1419 mp4 1024x576    25 | ~508.00MiB 1419k m3u8  | avc1.4D4029 mp4a.40.2
hls-1981 mp4 1280x720    25 | ~709.13MiB 1981k m3u8  | avc1.4D4029 mp4a.40.2

BTW, thanks for the very prompt response! 👍 🥇

aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this issue Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is not site-specific
Projects
None yet
Development

No branches or pull requests

3 participants