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

[youtube] Cannot get index py in: {} (caused by KeyError('py')) #11798

Closed
9 of 11 tasks
torfinli opened this issue Dec 13, 2024 · 2 comments
Closed
9 of 11 tasks

[youtube] Cannot get index py in: {} (caused by KeyError('py')) #11798

torfinli opened this issue Dec 13, 2024 · 2 comments
Labels
high-priority site:youtube site-bug Issue with a specific website

Comments

@torfinli
Copy link

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

China

Provide a description that is worded well enough to be understood

Sometime I download video with a cookie file, I get this error. But I can successfully get mp4 format without cookie file.

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 --no-progress --no-mtime --cookies cookies.txt -o video.mp4 --write-info-json --skip-download https://www.youtube.com/watch?v=tziNYGCaR5Q --list-formats -vU
[debug] Command-line config: ['--no-progress', '--no-mtime', '--cookies', '/app/tmp/import/runtime/cookies.txt', '-o', './tmp/import/118718fc-4853-4f2f-b55a-3e819e6210e9/1/YT_tziNYGCaR5Q/source/video-raw.video', '--write-info-json', '--skip-download', 'https://www.youtube.com/watch?v=tziNYGCaR5Q', '--list-formats', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [4bd265539] (pip)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.8.0-1015-gcp-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 7.0.1 (fdk,setts), ffprobe 7.0.1
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, mutagen-1.47.0, requests-2.32.3, sqlite3-3.37.2, urllib3-2.2.3, websockets-13.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: [email protected] from yt-dlp/yt-dlp
yt-dlp is up to date ([email protected] from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://www.youtube.com/watch?v=tziNYGCaR5Q
[youtube] tziNYGCaR5Q: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] tziNYGCaR5Q: Downloading web creator player API JSON
[youtube] tziNYGCaR5Q: Downloading mweb player API JSON
[debug] [youtube] Extracting signature function js_2f1832d2_112
[youtube] tziNYGCaR5Q: Downloading player 2f1832d2
WARNING: [youtube] tziNYGCaR5Q: Signature extraction failed: Some formats may be missing
[debug] [youtube] Cannot get index py in: {} (caused by KeyError('py')); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[debug] [youtube] Extracting signature function js_2f1832d2_108
WARNING: Only images are available for download. use --list-formats to see them
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] Available formats for tziNYGCaR5Q:
ID  EXT   RESOLUTION FPS │ PROTO │ VCODEC MORE INFO
────────────────────────────────────────────────────
sb2 mhtml 25x45        1 │ mhtml │ images storyboard
sb3 mhtml 48x27        2 │ mhtml │ images storyboard
sb1 mhtml 50x90        1 │ mhtml │ images storyboard
sb0 mhtml 101x180      1 │ mhtml │ images storyboard
@torfinli torfinli added site-bug Issue with a specific website triage Untriaged issue labels Dec 13, 2024
@Boya-Na
Copy link

Boya-Na commented Dec 13, 2024

url: https://youtube.com/shorts/haImbK2TShY, have same problem

@torfinli
Copy link
Author

I would like to provide some additional information. I have another account that rarely experiences this type of error with its cookies, but I have used another new YouTube account where this error occurs frequently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority site:youtube site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

3 participants