Skip to content

--cookies-from-browser: WARNING: failed to decrypt with DPAPI / ERROR: 'NoneType' object has no attribute 'decode' #10927

@bigestyjoy

Description

@bigestyjoy

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

Provide a description that is worded well enough to be understood

Happens on all sites.
After removing the "--cookies-from-browser chrome", the error does not occur.

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 -vU -f 248+251 --proxy http://127.0.0.1:10809 --cookies-from-browser chrome --mark-watched https://www.youtube.com/watch?v=v9lMa4BGAuA
[debug] Command-line config: ['-vU', '-f', '248+251', '--proxy', 'http://127.0.0.1:10809', '--cookies-from-browser', 'chrome', '--mark-watched', 'https://www.youtube.com/watch?v=v9lMa4BGAuA']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.08.06 from yt-dlp/yt-dlp [4d9231208] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.26120-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2023-07-19-git-efa6cec759-full_build-www.gyan.dev (setts), ffprobe 2023-07-19-git-efa6cec759-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.35.5, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {'all': 'http://127.0.0.1:10809'}
Extracting cookies from chrome
[Cookies] Searching for "Cookies":      1 files searched
[debug] Extracting cookies from: "C:\Users\biges\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\biges\AppData\Local\Google\Chrome\User Data\Local State"
[Cookies] Loading cookie   1842/  2088WARNING: failed to decrypt with DPAPI
Traceback (most recent call last):
  File "yt_dlp\__main__.py", line 17, in <module>
  File "yt_dlp\__init__.py", line 1081, in main
  File "yt_dlp\__init__.py", line 979, in _real_main
  File "yt_dlp\YoutubeDL.py", line 720, in __init__
  File "yt_dlp\YoutubeDL.py", line 4070, in print_debug_header
  File "functools.py", line 967, in __get__
  File "yt_dlp\YoutubeDL.py", line 4245, in _request_director
  File "yt_dlp\YoutubeDL.py", line 4220, in build_request_director
  File "functools.py", line 967, in __get__
  File "yt_dlp\YoutubeDL.py", line 4116, in cookiejar
  File "yt_dlp\cookies.py", line 94, in load_cookies
  File "yt_dlp\cookies.py", line 115, in extract_cookies_from_browser
  File "yt_dlp\cookies.py", line 315, in _extract_chrome_cookies
  File "yt_dlp\cookies.py", line 350, in _process_chrome_cookie
  File "yt_dlp\cookies.py", line 525, in decrypt
AttributeError: 'NoneType' object has no attribute 'decode'
[17148] Failed to execute script '__main__' due to unhandled exception!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug that is not site-specificcore:cookiesRelated to core cookie handling (e.g. --cookies or --cookies-from-browser)external issueIssue with an external tool or site

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions