Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
UnicodeEncodeError when --extract-audio with title having Chinese #332
Comments
|
Windows only issue. We really need smart standard functions to handle encoding (in and) out. |
|
It would be better to force
(Does |
|
@grawity |
|
Works fine with latest version. |
platform: Win7 x64
youtube-dl --version: 2012.02.27
python --version: 2.7.2
C:\Users\Alan\test>youtube-dl.py -l --extract-audio --audio-format mp3 http://www.youtube.com/watch?v=kgLf9VOe5V0
[youtube] Setting language
[youtube] kgLf9VOe5V0: Downloading video webpage
[youtube] kgLf9VOe5V0: Downloading video info webpage
[youtube] kgLf9VOe5V0: Extracting video information
[download] Destination: 你走了-李聖傑-kgLf9VOe5V0.mp4
[download] 100.0% of 8.25M at 69.98k/s ETA 00:00
Traceback (most recent call last):
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 46
45, in
main()
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 46
36, in main
_real_main()
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 46
20, in _real_main
retcode = fd.download(all_urls)
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 86
9, in download
ie.extract(url)
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 11
35, in extract
return self._real_extract(url)
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 14
63, in _real_extract
'player_url': player_url,
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 84
8, in process_info
self.post_process(filename, info_dict)
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 88
4, in post_process
info = pp.run(info)
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 41
10, in run
filecodec = self.get_audio_codec(path)
File "C:\Users\Alan\Dropbox\Alan\PyCharmWorkspace\test\youtube-dl.py", line 40
73, in get_audio_codec
handle = subprocess.Popen(cmd, stderr=file(os.path.devnull, 'w'), stdout=sub
process.PIPE)
File "C:\Python27\lib\subprocess.py", line 679, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 25-27: ord
inal not in range(128)