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

[YandexMusic] argument of type 'bool' is not iterable after calling _download_webpage_handle #4432

Open
8 tasks done
mvoidex opened this issue Jul 24, 2022 · 7 comments
Open
8 tasks done
Labels
account-needed Account details are needed to test/fix this site-bug Issue with a specific website

Comments

@mvoidex
Copy link

mvoidex commented Jul 24, 2022

Checklist

  • I'm reporting a bug unrelated to a specific site
  • I've verified that I'm running yt-dlp version 2022.07.18 (update instructions) or later (specify commit)
  • I've checked that all provided URLs are playable in a browser with the same IP and same login details
  • 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. DO NOT post duplicates
  • I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

While downloading large Yandex Music playlist I get error argument of type 'bool' is not iterable

The reason is that:

  • InfoExtractor._download_webpage_handle can return False
  • Derived class tests for some string within result:
    • Yandex Music affected: link
    • Also Xiaomi may be affected: link
    • And Adobe possibly too: link, unpacks result of _download_webpage_handle, which calls base version

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

yt-dlp --cookies ..\..\yandex.music.txt https://music.yandex.ru/users/VoidEx/playlists/1031 -vU
[debug] Command-line config: ['--cookies', '..\\..\\yandex.music.txt', 'https://music.yandex.ru/users/VoidEx/playlists/1031', '-vU']
[debug] Encodings: locale cp1251, fs utf-8, pref cp1251, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.07.18 [135f05e] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.22000-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.07.18, Current version: 2022.07.18
yt-dlp is up to date (2022.07.18)
[debug] [yandexmusic:playlist] Extracting URL: https://music.yandex.ru/users/VoidEx/playlists/1031
[yandexmusic:playlist] 1031: Downloading playlist JSON
[yandexmusic:playlist] 1031: Downloading missing tracks JSON chunk 1
WARNING: [yandexmusic:playlist] Unable to download JSON metadata: HTTP Error 431: Request Header Fields Too Large
ERROR: argument of type 'bool' is not iterable
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1431, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1506, in __extract_info
  File "yt_dlp\extractor\common.py", line 644, in extract
  File "yt_dlp\extractor\yandexmusic.py", line 356, in _real_extract
  File "yt_dlp\extractor\yandexmusic.py", line 217, in _extract_tracks
  File "yt_dlp\extractor\yandexmusic.py", line 49, in _call_api
  File "yt_dlp\extractor\yandexmusic.py", line 44, in _download_json
  File "yt_dlp\extractor\common.py", line 1004, in download_content
  File "yt_dlp\extractor\common.py", line 968, in download_handle
  File "yt_dlp\extractor\yandexmusic.py", line 39, in _download_webpage_handle
TypeError: argument of type 'bool' is not iterable
@mvoidex mvoidex added bug Bug that is not site-specific triage Untriaged issue labels Jul 24, 2022
@mvoidex
Copy link
Author

mvoidex commented Jul 24, 2022

However, problem that causing this issue is "HTTP Error 431: Request Header Fields Too Large", and i don't know how to workaround it :(
Fixing this issue can make just better error message

@pukkandan pukkandan added account-needed Account details are needed to test/fix this site-bug Issue with a specific website and removed bug Bug that is not site-specific triage Untriaged issue labels Jul 24, 2022
@pukkandan
Copy link
Member

It is likely an issue either with cookies or with how yt-dlp is processing them. First try by re-exporting the cookies. If that doesn't help, I can take a look if you are willing to share login details with me

@pukkandan
Copy link
Member

nvm, issue seems related to ytdl-org/youtube-dl#27355

@mvoidex
Copy link
Author

mvoidex commented Jul 24, 2022

nvm, issue seems related to ytdl-org/youtube-dl#27355

Yes, but as I can see, it's fixed there and also this commit merged here as long as there's message about chunks while reading playlist

@mvoidex
Copy link
Author

mvoidex commented Jul 24, 2022

It is likely an issue either with cookies or with how yt-dlp is processing them. First try by re-exporting the cookies. If that doesn't help, I can take a look if you are willing to share login details with me

I've tried reexporting cookies and it didn't help. I can share login details, if it helps, where I can do it?

@pukkandan
Copy link
Member

Contact: discord (pukkandan#4207) / reddit (/u/pukkandan) / email (pukkandan.ytdlp@gmail.com)

@mvoidex
Copy link
Author

mvoidex commented Jul 24, 2022

Let's try discord, I'm voidex#9676

@pukkandan pukkandan changed the title argument of type 'bool' is not iterable after calling _download_webpage_handle [YandexMusic] argument of type 'bool' is not iterable after calling _download_webpage_handle Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
account-needed Account details are needed to test/fix this site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

2 participants