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/options.py:788: UnicodeWarning #5157

Closed
MrS0m30n3 opened this issue Mar 7, 2015 · 2 comments
Closed

youtube_dl/options.py:788: UnicodeWarning #5157

MrS0m30n3 opened this issue Mar 7, 2015 · 2 comments

Comments

@MrS0m30n3
Copy link

@MrS0m30n3 MrS0m30n3 commented Mar 7, 2015

$ youtube-dl -i -v -o '/home/user/Workplace/test/youtube/τεστ/%(title)s.%(ext)s' -f 17 https://www.youtube.com/watch?v=zSAJ0l4OBHM

/usr/lib/python2.7/site-packages/youtube_dl-2015.03.03.1-py2.7.egg/youtube_dl/options.py:788: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if '--ignore-config' in command_line_conf:
[debug] System config: []
[debug] User config: []
/usr/lib/python2.7/site-packages/youtube_dl-2015.03.03.1-py2.7.egg/youtube_dl/options.py:96: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
i = opts.index(private_opt)
[debug] Command-line args: ['-i', '-v', '-o', '/home/user/Workplace/test/youtube/\xcf\x84\xce\xb5\xcf\x83\xcf\x84/%(title)s.%(ext)s', '-f', '17', 'https://www.youtube.com/watch?v=zSAJ0l4OBHM']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.03.03.1
[debug] Python version 2.7.3
[debug] Proxy map: {}
[youtube] zSAJ0l4OBHM: Downloading webpage
[youtube] zSAJ0l4OBHM: Extracting video information
[youtube] {43} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {18} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {5} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {36} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {17} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {133} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {242} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {243} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {160} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {140} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] {171} signature length 40.43, html5 player en_US-vflT9SJ6t
[youtube] zSAJ0l4OBHM: Downloading DASH manifest
[debug] Invoking downloader on u'https://r6---sn-ixaa5n-5uie.googlevideo.com/videoplayback?key=yt5&id=o-AC4u2-HT65BaQFlnWIRlZQuyOiMCE6qalg2NCk8haSji&expire=1425784359&ip=5.54.49.82&upn=f8RWjVsNrsU&itag=17&ms=au&initcwndbps=866250&mv=m&dur=247.896&source=youtube&pl=20&mime=video%2F3gpp&requiressl=yes&mt=1425762638&ipbits=0&mm=31&fexp=907263%2C927622%2C9406664%2C9407692%2C9407795%2C9407812%2C943917%2C948124%2C951703%2C952302%2C952612%2C952901%2C955301%2C957201%2C959701&sver=3&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&signature=6279D32808060CC3F10DAC6FF30553EACC6B269B.09D0C9BEE63B12B1687D7DB44F08CFDA6CF65D4A&ratebypass=yes'
[download] home_user_Workplace_test_youtube_τεστ_America - A Horse With No Name+Lyrics.3gp has already been downloaded
[download] 100% of 1.34MiB

@MrS0m30n3 MrS0m30n3 changed the title youtube_dl/options.py:791: UnicodeWarning youtube_dl/options.py:788: UnicodeWarning Mar 7, 2015
@phihag phihag closed this in f5e2efb Mar 24, 2015
@phihag
Copy link
Contributor

@phihag phihag commented Mar 24, 2015

Thank you for the report. I believe this issue to be fixed in youtube-dl 2015.03.24. See our FAQ if you need help updating.

@MrS0m30n3
Copy link
Author

@MrS0m30n3 MrS0m30n3 commented Apr 1, 2015

@phihag

Basically the fix: f5e2efb results to a new Error.

I don't have time to check it but i think that the error occurs because you are trying to decode the options two times. One at the f5e2efb#diff-09f445e8685f0e866d7ff74c9481feecR800 and one at the https://github.com/rg3/youtube-dl/blob/master/youtube_dl/__init__.py#L195

$ youtube-dl -i -v -o '/home/user/Workplace/test/youtube/τεστ/%(title)s.%(ext)s' -f 17 https://www.youtube.com/watch?v=zSAJ0l4OBHM
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-i', u'-v', u'-o', u'/home/user/Workplace/test/youtube/\u03c4\u03b5\u03c3\u03c4/%(title)s.%(ext)s', u'-f', u'17', u'https://www.youtube.com/watch?v=zSAJ0l4OBHM']
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 9, in
load_entry_point('youtube-dl==2015.03.28', 'console_scripts', 'youtube-dl')()
File "/usr/lib/python2.7/site-packages/youtube_dl-2015.03.28-py2.7.egg/youtube_dl/init.py", line 408, in main
_real_main(argv)
File "/usr/lib/python2.7/site-packages/youtube_dl-2015.03.28-py2.7.egg/youtube_dl/init.py", line 195, in _real_main
opts.outtmpl = opts.outtmpl.decode(preferredencoding())
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 34-37: ordinal not in range(128)

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.