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

UnicodeWarning Error #2683

Closed
MrS0m30n3 opened this issue Apr 3, 2014 · 4 comments
Closed

UnicodeWarning Error #2683

MrS0m30n3 opened this issue Apr 3, 2014 · 4 comments

Comments

@MrS0m30n3
Copy link

@MrS0m30n3 MrS0m30n3 commented Apr 3, 2014

Command

youtube-dl -o '/home/user/workplace/test/youtube/βιντεο/%(title)s.%(ext)s' -f 5 http://www.youtube.com/watch?v=0KSOMA3QBU0

Output

[youtube] Setting language
[youtube] 0KSOMA3QBU0: Downloading webpage
[youtube] 0KSOMA3QBU0: Downloading video info webpage
[youtube] 0KSOMA3QBU0: Extracting video information
[youtube] 0KSOMA3QBU0: Encrypted signatures detected.
[youtube] 0KSOMA3QBU0: Downloading js player vfl7i9w86
/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py:871: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
[download] Destination: /home/user/workplace/test/youtube/βιντεο/Katy Perry - Dark Horse (Official) ft. Juicy J.flv
[download] 100% of 9.25MiB in 00:15

If i change YoutubeDL.py:871 to this

#dn = os.path.dirname(encodeFilename(filename))
dn = os.path.dirname(filename)
if dn != '' and not os.path.exists(dn):
os.makedirs(dn)

it works fine without UnicodeWarning error.

@phihag
Copy link
Contributor

@phihag phihag commented Apr 3, 2014

Thank you for the report. Can you post the entire output you get when adding -v to the command line? That output should allow us to reproduce the problem and correct the filename encoding (we can't delete it since it is required on some platforms).

@MrS0m30n3
Copy link
Author

@MrS0m30n3 MrS0m30n3 commented Apr 3, 2014

Command

youtube-dl -v -o '/home/user/workplace/test/youtube/βιντεο/%(title)s.%(ext)s' -f 5 http://www.youtube.com/watch?v=0KSOMA3QBU0

Output

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-o', '/home/user/workplace/test/youtube/\xce\xb2\xce\xb9\xce\xbd\xcf\x84\xce\xb5\xce\xbf/%(title)s.%(ext)s', '-f', '5', 'http://www.youtube.com/watch?v=0KSOMA3QBU0']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.03.30.1
[debug] Python version 2.7.3 - Linux-3.2.29-i686-AMD_Turion-tm-_64_Mobile_Technology_ML-32-with-slackware-14.0
[debug] Proxy map: {}
[youtube] Setting language
[youtube] 0KSOMA3QBU0: Downloading webpage
[youtube] 0KSOMA3QBU0: Downloading video info webpage
[youtube] 0KSOMA3QBU0: Extracting video information
[youtube] 0KSOMA3QBU0: Encrypted signatures detected.
[youtube] encrypted signature length 85 (41.43), itag 22, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 43, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 18, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 5, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 36, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 17, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 137, html5 player en_US-vfl7i9w86
[youtube] 0KSOMA3QBU0: Downloading js player vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 136, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 135, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 134, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 133, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 160, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 140, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 82 (41.40), itag 171, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 137, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 248, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 136, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 247, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 135, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 244, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 134, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 243, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 133, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 242, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 160, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 140, html5 player en_US-vfl7i9w86
[youtube] encrypted signature length 85 (41.43), itag 171, html5 player en_US-vfl7i9w86
/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py:871: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
[download] Destination: /home/user/workplace/test/youtube/βιντεο/Katy Perry - Dark Horse (Official) ft. Juicy J.flv
[download] 100% of 9.25MiB in 00:12

@phihag phihag closed this in d26e981 Apr 3, 2014
@phihag
Copy link
Contributor

@phihag phihag commented Apr 3, 2014

Thank you for the report. This should be fixed in youtube-dl 2014.04.03.2. Type sudo youtube-dl -U to update.

@MrS0m30n3
Copy link
Author

@MrS0m30n3 MrS0m30n3 commented Apr 3, 2014

It worked. Thank you very much for the fix!

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.