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

Parsing cookies.txt throws UnicodeDecodeError #24271

Closed
galenguyer opened this issue Mar 6, 2020 · 1 comment
Closed

Parsing cookies.txt throws UnicodeDecodeError #24271

galenguyer opened this issue Mar 6, 2020 · 1 comment

Comments

@galenguyer
Copy link

@galenguyer galenguyer commented Mar 6, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.03.06
  • 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

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--cookies', u'cookies.txt', u'--download-archive', u'archive.log', u'--add-metadata', u'--write-sub', u'--embed-subs', u'--sub-lang', u'en', u'--embed-thumbnail', u'--write-all-thumbnails', u'--write-info-json', u'--ignore-errors', u'--no-continue', u'--format', u'(bestvideo[vcodec^=av01][height>=2160][fps>30]/bestvideo[vcodec=vp9.2][height>=2160][fps>30]/bestvideo[vcodec=vp9][height>=2160][fps>30]/bestvideo[vcodec^=av01][height>=2160]/bestvideo[vcodec=vp9.2][height>=2160]/bestvideo[vcodec=vp9][height>=2160]/bestvideo[height>=2160])/(bestvideo[vcodec^=av01][height>=1440][fps>30]/bestvideo[vcodec=vp9.2][height>=1440][fps>30]/bestvideo[vcodec=vp9][height>=1440][fps>30]/bestvideo[vcodec^=av01][height>=1440]/bestvideo[vcodec=vp9.2][height>=1440]/bestvideo[vcodec=vp9][height>=1440]/bestvideo[height>=1440])/(bestvideo[vcodec^=av01][height>=1080][fps>30]/bestvideo[vcodec=vp9.2][height>=1080][fps>30]/bestvideo[vcodec=vp9][height>=1080][fps>30]/bestvideo[vcodec^=av01][height>=1080]/bestvideo[vcodec=vp9.2][height>=1080]/bestvideo[vcodec=vp9][height>=1080]/bestvideo[height>=1080]/bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best', u'--merge-output-format', u'mkv', u'--yes-playlist', u'https://www.youtube.com/playlist?list=LLrylGjyFLOuegzZRs8zdjdg', u'--merge-output-format', u'mkv', u'--output', u'%(uploader)s - %(title)s (%(width)sx%(height)s).%(ext)s']
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./youtube-dl/__main__.py", line 19, in <module>
  File "./youtube-dl/youtube_dl/__init__.py", line 474, in main
  File "./youtube-dl/youtube_dl/__init__.py", line 441, in _real_main
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 419, in __init__
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2329, in _setup_opener
  File "./youtube-dl/youtube_dl/utils.py", line 2753, in load
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 110: ordinal not in range(128)

Description

The latest version of youtube-dl fails to parse the cookies.txt file exported with either cookies.txt or Export Cookies with the error UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 110: ordinal not in range(128). Cookies were exported from Firefox Developer Build 74.0 on Windows 10 and uploaded over WinSCP to an Ubuntu 18.04 server. The issue persisted after running dos2unix on the cookies file on the server. This process worked fine two days ago, so the issue is relatively new.

@ytdl-org ytdl-org deleted a comment from darkhelmet2016 Mar 7, 2020
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 7, 2020

You must provide reproducible cookie file.

@dstftw dstftw closed this Mar 7, 2020
@ytdl-org ytdl-org deleted a comment from darkhelmet2016 Mar 7, 2020
@ytdl-org ytdl-org locked and limited conversation to collaborators Mar 7, 2020
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.