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

Problem with non-latin file names #5288

Closed
iivanov2 opened this issue Mar 25, 2015 · 4 comments
Closed

Problem with non-latin file names #5288

iivanov2 opened this issue Mar 25, 2015 · 4 comments
Labels
bug

Comments

@iivanov2
Copy link

@iivanov2 iivanov2 commented Mar 25, 2015

I get an error when I try to save file with non-latin name (cyrillic in my case).
The video URL is: http://vbox7.com/play:04e102e14a
"C:\Джена - Спри да ми досаждаш, 2015.mp4" "http://vbox7.com/play:04e102e14a"
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl__init__.pyo", line 408, in main
File "youtube_dl__init__.pyo", line 195, in _real_main
File "encodings\cp1251.pyo", line 15, in decode
UnicodeEncodeError: 'ascii' codec can't encode characters in position 23-27: ordinal not in range(12
8)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 26, 2015

Post the full output you get when running with --verbose option.

@iivanov2
Copy link
Author

@iivanov2 iivanov2 commented Mar 26, 2015

This is the output with -v option:

c:\youtube-dl>youtube-dl -v -o видео.mp4 http://vbox7.com/play:04e102e14a
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'-o', u'\ufffd\ufffd\ufffd\ufffd\ufffd.mp4',
u'http://vbox7.com/play:04e102e14a']
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl__init__.pyo", line 408, in main
File "youtube_dl__init__.pyo", line 195, in _real_main
File "encodings\cp1251.pyo", line 15, in decode
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordin
al not in range(128)

AND WITHOUT -O option:

c:\youtube-dl>youtube-dl -v http://vbox7.com/play:04e102e14a
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://vbox7.com/play:04e102e14a']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2015.03.24
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[Vbox7] 04e102e14a: Downloading webpage
[Vbox7] 04e102e14a: Downloading redirect page
[Vbox7] 04e102e14a: Downloading info webpage
[debug] Invoking downloader on u'http://media07.vbox7.com/s/04/04e102e14ar40ccea
f47.mp4'
[download] Destination: Джена - Спри да ми досаждаш, 2015-04e102e14a.mp4
[download] 100% of 53.08MiB in 01:35

The file was downloaded successfully when I didn't use -o option.

@gradha
Copy link

@gradha gradha commented Mar 29, 2015

I'm having the same problems here since I updated. Running git-bisect I get the following history with the provided example command:

git bisect start
# bad: [ad320e9b8376221a3eda935a358886b6e7ab7bf6] [generic] Add support for 5min embeds (#5310)
git bisect bad ad320e9b8376221a3eda935a358886b6e7ab7bf6
# good: [99043c2ea5a670587b005a9cae33cd138a515290] Replace test for dailymotion users
git bisect good 99043c2ea5a670587b005a9cae33cd138a515290
# good: [8a2300a59703da441932f361e4e496bb64e4b502] [kontrtube] Fix video title extraction
git bisect good 8a2300a59703da441932f361e4e496bb64e4b502
# good: [4baea47c42c291564dcbbbfc93955afbd4a80460] release 2015.01.09.1
git bisect good 4baea47c42c291564dcbbbfc93955afbd4a80460
# good: [c2787701ccbe83a481029cf1fe8b74728e159a56] Merge pull request #4950 from peugeot/drtuber
git bisect good c2787701ccbe83a481029cf1fe8b74728e159a56
# good: [31bd39256b153391f521169ae449fd8c7c6e51d7] --load-info: Use the fileinput module
git bisect good 31bd39256b153391f521169ae449fd8c7c6e51d7
# good: [8508557e77362bf1e5bcc919e89e6b4aa5d101ba] [test/YoutubeDL] Use valid urls
git bisect good 8508557e77362bf1e5bcc919e89e6b4aa5d101ba
# good: [1887ecd4d629f44370846d372155512ec29e1f27] [twitch] Fix login
git bisect good 1887ecd4d629f44370846d372155512ec29e1f27
# bad: [8f76df7f3791bb085199eb90c3b4125931a44e55] Updated init to add 22tracks
git bisect bad 8f76df7f3791bb085199eb90c3b4125931a44e55
# good: [a1d0aa7b882484685a1a02185d0dafd51c545701] [libsyn] Fix extractor alphabetic order
git bisect good a1d0aa7b882484685a1a02185d0dafd51c545701
# good: [93f787070ff2de48023c5bfeaebd153b3e29137a] [twitch] Only match digits for the video id
git bisect good 93f787070ff2de48023c5bfeaebd153b3e29137a
# bad: [48c971e07336f1e5d33a760e454c52fac83392d5] release 2015.03.24
git bisect bad 48c971e07336f1e5d33a760e454c52fac83392d5
# good: [b0872c19ea6fb5dcc20d695d6faead4af42da364] [npo] Skip broken URL links (Closes #5266)
git bisect good b0872c19ea6fb5dcc20d695d6faead4af42da364
# bad: [f5e2efbbf0a4a1fa02df09a12ce9ec69970ab14c] [options] Handle special characters in argv (Fixes #5157)
git bisect bad f5e2efbbf0a4a1fa02df09a12ce9ec69970ab14c
# first bad commit: [f5e2efbbf0a4a1fa02df09a12ce9ec69970ab14c] [options] Handle special characters in argv (Fixes #5157)

The log shows that the commit f5e2efb fixing #5157 was the first one to break unicode parameters. When I checkout the previous version b0872c1 everything works again.

@dstftw dstftw added the bug label Apr 2, 2015
@dstftw dstftw closed this in ff556f5 Apr 3, 2015
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 3, 2015

Thanks for the report. This issue will be fixed in the next version of youtube-dl.

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
3 participants
You can’t perform that action at this time.