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-dl not working when using with config file #22547

Closed
wankio opened this issue Sep 29, 2019 · 2 comments
Closed

Youtube-dl not working when using with config file #22547

wankio opened this issue Sep 29, 2019 · 2 comments
Labels

Comments

@wankio
Copy link

@wankio wankio commented Sep 29, 2019

youtube-dl version : 2019.09.28 (both pip/exe)

-o H:/youtube-dl/%(extractor)s/%(title)s-%(uploader)s-%(channel_id)s-%(channel)s-%(id)s.%(ext)s
-f bestvideo[height<=?1080]+bestaudio/best

--write-thumbnail 
--cookies I:\cookies.txt
--write-sub
--write-auto-sub
--sub-format srt
--sub-lang en

config.txt or youtube-dl.conf, everytime i'm running youtube-dl (pip or released .exe version). both have error.

C:\Users\GEN32UC>youtube-dl Traceback (most recent call last): File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\GEN32UC\AppData\Local\Programs\Python\Python37\Scripts\youtube-dl.exe\__main__.py", line 9, in <module> File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\site-packages\youtube_dl\__init__.py", line 474, in main _real_main(argv) File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\site-packages\youtube_dl\__init__.py", line 441, in _real_main with YoutubeDL(ydl_opts) as ydl: File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 418, in __init__ self._setup_opener() File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 2328, in _setup_opener self.cookiejar.load(ignore_discard=True, ignore_expires=True) File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\site-packages\youtube_dl\utils.py", line 2748, in load for line in f: File "c:\users\gen32uc\appdata\local\programs\python\python37\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 532: character maps to <undefined>

If i'm remove config file, it running.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 29, 2019

You have non-ASCII in your cookie file.

@dstftw dstftw closed this Sep 29, 2019
@dstftw dstftw added the invalid label Sep 29, 2019
@wankio
Copy link
Author

@wankio wankio commented Sep 29, 2019

oh thank, the problem caused by new cookies file, i have to save it from utf8 into ansi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.