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

UnicodeDecodeError when loading cookies.sqlite file. #20927

Closed
kruug opened this issue May 1, 2019 · 3 comments
Closed

UnicodeDecodeError when loading cookies.sqlite file. #20927

kruug opened this issue May 1, 2019 · 3 comments
Labels

Comments

@kruug
Copy link

@kruug kruug commented May 1, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.04.30
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

PS E:\Repo> & C:\Users\user\YouTube-DL\youtube-dl.exe -v --cookies "C:\Users\user\AppData\Roaming\Mozilla\Firefox\Profiles\5o0u1rza.default\cookies.sqlite" --mark-watched --skip-download https://www.youtube.com/user/RepoNut
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--cookies', 'C:\\Users\\user\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\5o0u1rza.default\\cookies.sqlite', '--mark-watched', '--skip-download', 'https://www.youtube.com/user/RepoNut']
Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpfeq7l785\build\youtube_dl\__init__.py", line 474, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpfeq7l785\build\youtube_dl\__init__.py", line 441, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpfeq7l785\build\youtube_dl\YoutubeDL.py", line 418, in __init__
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpfeq7l785\build\youtube_dl\YoutubeDL.py", line 2318, in _setup_opener
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpfeq7l785\build\youtube_dl\utils.py", line 1164, in load
  File "C:\Python\Python34\lib\encodings\cp1252.py", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 7600: character maps to <undefined>

Description

Attempting to mark an entire YouTube channel as "Watched". Doing so without a cookie file would require me to login and use 2FA for each and every video in the channel. When I pass the cookie file, I get a UnicodeDecodeError.

Looking into this, it appears that the issue lies with python2. Moving to python3 should resolve the issue. Normally, I would just install python3 and be done. I do have python3.7 installed on this computer, so that means that youtube-dl.exe comes with a static python build included.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 1, 2019

Cookies must be in Netscape HTTP cookies format.

@dstftw dstftw closed this May 1, 2019
@dstftw dstftw added the invalid label May 1, 2019
@kruug
Copy link
Author

@kruug kruug commented May 1, 2019

So most major browsers no longer use the Netscape HTTP cookie format. How does one convert the cookies file to something youtube-dl can read? Would be helpful if you actually helped instead of "Closed, not our problem."

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 1, 2019

RTFM.

@ytdl-org ytdl-org locked and limited conversation to collaborators May 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.