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

Unable to use Firefox containers in multibyte environments #7797

Closed
9 of 10 tasks
neilyhy opened this issue Aug 9, 2023 · 0 comments · Fixed by #7800
Closed
9 of 10 tasks

Unable to use Firefox containers in multibyte environments #7797

neilyhy opened this issue Aug 9, 2023 · 0 comments · Fixed by #7800
Labels
bug Bug that is not site-specific

Comments

@neilyhy
Copy link

neilyhy commented Aug 9, 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

  • I'm reporting a bug unrelated to a specific site
  • I've verified that I'm running yt-dlp version 2023.07.06 (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 known issues and 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

Under the following conditions:

  • --cookies-from-browser
  • Firefox
  • containers
  • there are any multibyte character in the name of any containers

yt-dlp will stop at the position showed below.
This is not limited to the using container, but just any container with even one such character exist will cause the problem.

This issue looks similar to issue #1276 , but happens when reading the firefox containers instead of cookies.
Not passing any container parameter (just 'firefox' instead of 'firefox::sth' ) , or removing all multibyte characters from all container names resolves this issue, but even firefox containers default names will contain such characters.

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

[debug] Command-line config: ['--simulate', '-vU', '--cookies-from-browser', 'firefox::ny', 'https://www.youtube.com/watch?v=KMU0tzLwhbE']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2021-03-16-git-9383885c0d-full_build-www.gyan.dev (setts), ffprobe 2021-03-16-git-9383885c0d-full_build-www.gyan.dev
[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
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\Neil\AppData\Roaming\Mozilla\Firefox\Profiles\tcd6o0so.default-1660320630895\cookies.sqlite"
Traceback (most recent call last):
  File "yt_dlp\__main__.py", line 17, in <module>
  File "yt_dlp\__init__.py", line 1008, in main
  File "yt_dlp\__init__.py", line 962, in _real_main
  File "yt_dlp\YoutubeDL.py", line 676, in __init__
  File "yt_dlp\YoutubeDL.py", line 3953, in print_debug_header
  File "yt_dlp\YoutubeDL.py", line 3997, in _setup_opener
  File "yt_dlp\cookies.py", line 106, in load_cookies
  File "yt_dlp\cookies.py", line 123, in extract_cookies_from_browser
  File "yt_dlp\cookies.py", line 157, in _extract_firefox_cookies
  File "json\__init__.py", line 293, in load
UnicodeDecodeError: 'cp932' codec can't decode byte 0x94 in position 1408: illegal multibyte sequence
[13440] Failed to execute script '__main__' due to unhandled exception!
@neilyhy neilyhy added bug Bug that is not site-specific triage Untriaged issue labels Aug 9, 2023
@bashonly bashonly removed the triage Untriaged issue label Aug 9, 2023
bashonly added a commit that referenced this issue Aug 12, 2023
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

Successfully merging a pull request may close this issue.

2 participants