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

Fatal error because of unicode chars #4272

Closed
KickassCoxa opened this issue Nov 22, 2014 · 3 comments
Closed

Fatal error because of unicode chars #4272

KickassCoxa opened this issue Nov 22, 2014 · 3 comments

Comments

@KickassCoxa
Copy link

@KickassCoxa KickassCoxa commented Nov 22, 2014

d:\music>youtube-dl.exe -x --max-filesize 50m --embed-thumbnail https://www.yout
ube.com/user/cyberhops/videos
[download] Downloading playlist: cyberhops
[youtube:user] cyberhops: Downloading video ids from 1 to 51
[youtube:user] cyberhops: Downloading video ids from 51 to 101
[youtube:user] cyberhops: Downloading video ids from 101 to 151
[youtube:user] cyberhops: Downloading video ids from 151 to 201
[youtube:user] cyberhops: Downloading video ids from 201 to 251
[youtube:user] cyberhops: Downloading video ids from 251 to 301
[youtube:user] playlist cyberhops: Downloading 261 videos
[download] Downloading video #1 of 261
[youtube] Confirming age
[youtube] CQ6Dsa6M3x8: Downloading webpage
[youtube] CQ6Dsa6M3x8: Downloading video info webpage
[youtube] CQ6Dsa6M3x8: Extracting video information
[youtube] CQ6Dsa6M3x8: Downloading DASH manifest
[download] Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.m4a has already been downl
oaded
[youtube] Post-process file Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.m4a exist
s, skipping
[ffmpeg] Fixing audio file "Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.m4a"
[atomicparsley] Adding thumbnail to "Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.
m4a"
Traceback (most recent call last):
File "main.py", line 18, in
File "youtube_dl__init__.pyo", line 356, in main
File "youtube_dl__init__.pyo", line 346, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 1097, in download
File "youtube_dl\YoutubeDL.pyo", line 547, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 677, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 600, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 547, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 593, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 873, in process_video_result
File "youtube_dl\YoutubeDL.pyo", line 1079, in process_info
File "youtube_dl\YoutubeDL.pyo", line 1134, in post_process
File "youtube_dl\postprocessor\atomicparsley.pyo", line 46, in run
File "subprocess.pyo", line 710, in init
File "subprocess.pyo", line 958, in _execute_child
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 22:
ordinal not in range(128)

@naglis
Copy link
Collaborator

@naglis naglis commented Nov 22, 2014

Please include the full output of the command when run with the --verbose flag. The output (including the first lines) contains important debugging information.

@KickassCoxa
Copy link
Author

@KickassCoxa KickassCoxa commented Nov 22, 2014

d:\music>youtube-dl.exe --verbose -x --max-filesize 50m --embed-thumbnail https:
//www.youtube.com/user/cyberhops/videos
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-x', '--max-filesize', '50m', '--embed
-thumbnail', 'https://www.youtube.com/user/cyberhops/videos']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2014.11.21.1
[debug] Python version 2.7.8 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-67886-, ffprobe N-67886-
[debug] Proxy map: {}
[download] Downloading playlist: cyberhops
[youtube:user] cyberhops: Downloading video ids from 1 to 51
[youtube:user] cyberhops: Downloading video ids from 51 to 101
[youtube:user] cyberhops: Downloading video ids from 101 to 151
[youtube:user] cyberhops: Downloading video ids from 151 to 201
[youtube:user] cyberhops: Downloading video ids from 201 to 251
[youtube:user] cyberhops: Downloading video ids from 251 to 301
[youtube:user] playlist cyberhops: Downloading 261 videos
[download] Downloading video #1 of 261
[youtube] Confirming age
[youtube] CQ6Dsa6M3x8: Downloading webpage
[youtube] CQ6Dsa6M3x8: Downloading video info webpage
[youtube] CQ6Dsa6M3x8: Extracting video information
[youtube] CQ6Dsa6M3x8: Downloading DASH manifest
[debug] Invoking downloader on 'https://r6---sn-cn3tc-ajte.googlevideo.com/video
playback?id=090e83b1ae8cdf1f&itag=141&source=youtube&requiressl=yes&ms=au&mv=m&m
m=31&ratebypass=yes&mime=audio/mp4&gir=yes&clen=9822187&lmt=1412969343264433&dur
=308.059&mt=1416697172&sver=3&upn=G-S8sdXb0fc&key=dg_yt0&signature=26D23DD6C2748
DE42E2950CCAA6B85329D0C1CB9.46767FE4BEEE90E81E01C2E23955576972AC9AAC&fexp=907259
,914084,915516,924639,927622,931349,931993,932404,936932,941004,943909,947209,94
7215,948124,952302,952605,952901,953912,957103,957105,957201&ip=94.118.128.13&ip
bits=0&expire=1416718939&sparams=ip,ipbits,expire,id,itag,source,requiressl,ms,m
v,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.m4a has already been downl
oaded
[youtube] Post-process file Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.m4a exist
s, skipping
[ffmpeg] Fixing audio file "Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'Jan - Métakramé Au Cycloscotch-CQ6Dsa
6M3x8.m4a' -vn -acodec copy 'Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.temp.m4a
'
[atomicparsley] Adding thumbnail to "Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.
m4a"
[debug] AtomicParsley command line: AtomicParsley 'Jan - Métakramé Au Cycloscotc
h-CQ6Dsa6M3x8.m4a' --artwork 'Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.thumb.m
4a' -o 'Jan - Métakramé Au Cycloscotch-CQ6Dsa6M3x8.temp.m4a'
Traceback (most recent call last):
File "main.py", line 18, in
File "youtube_dl__init__.pyo", line 356, in main
File "youtube_dl__init__.pyo", line 346, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 1097, in download
File "youtube_dl\YoutubeDL.pyo", line 547, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 677, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 600, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 547, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 593, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 873, in process_video_result
File "youtube_dl\YoutubeDL.pyo", line 1079, in process_info
File "youtube_dl\YoutubeDL.pyo", line 1134, in post_process
File "youtube_dl\postprocessor\atomicparsley.pyo", line 46, in run
File "subprocess.pyo", line 710, in init
File "subprocess.pyo", line 958, in _execute_child
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 22:
ordinal not in range(128)

d:\music>pause
Press any key to continue . . .

@rowanthorpe
Copy link

@rowanthorpe rowanthorpe commented Dec 7, 2014

As can be seen at the commented stackoverflow link at https://github.com/rg3/youtube-dl/blob/master/youtube_dl/utils.py#L352 it looks (unless I've misread the issue) like this is a problem with non-ascii filenames using Python < v3, particularly on Windows. At that link some workarounds are given (and one is used in youtube-dl), but as can be seen from the non-resolution at http://bugs.python.org/issue1759845 it looks like if you need to deal with a non-ascii filename which is in an encoding other than your locale-encoding using python < v3, you are in for a nightmare. I guess the "solution" in these cases is to use python >=v3... :-(

@dstftw dstftw closed this May 20, 2016
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
4 participants
You can’t perform that action at this time.