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

UnicodeEncodeError: 'charmap' codec can't encode characters #299

Open
5shekel opened this issue Feb 29, 2012 · 2 comments
Open

UnicodeEncodeError: 'charmap' codec can't encode characters #299

5shekel opened this issue Feb 29, 2012 · 2 comments

Comments

@5shekel
Copy link

@5shekel 5shekel commented Feb 29, 2012

youtube-dl.py http://www.youtube.com/watch?v=FrWx4GQ485M -o %(autonumber)s-%(stitle)s-%(id)s-%(uploader)s.%(ext)s -c -i -f 18 --console-title -w --write-info-json

[youtube] Setting language
[youtube] Logging in
[youtube] Confirming age
[youtube] FrWx4GQ485M: Downloading video webpage
[youtube] FrWx4GQ485M: Downloading video info webpage
[youtube] FrWx4GQ485M: Extracting video information
[info] Video description metadata as JSON to: 00001-___-__9-FrWx4GQ485M-partzifl
och.mp4.info.json
Traceback (most recent call last):
File "M:\bin\youtube-dl\youtube-dl.py", line 4625, in
main()
File "M:\bin\youtube-dl\youtube-dl.py", line 4616, in main
_real_main()
File "M:\bin\youtube-dl\youtube-dl.py", line 4600, in _real_main
retcode = fd.download(all_urls)
File "M:\bin\youtube-dl\youtube-dl.py", line 858, in download
ie.extract(url)
File "M:\bin\youtube-dl\youtube-dl.py", line 1116, in extract
return self._real_extract(url)
File "M:\bin\youtube-dl\youtube-dl.py", line 1445, in _real_extract
'player_url': player_url,
File "M:\bin\youtube-dl\youtube-dl.py", line 817, in process_info
self.trouble(u'ERROR: Cannot write metadata to JSON file ' + infofn)
File "M:\bin\youtube-dl\youtube-dl.py", line 613, in trouble
self.to_stderr(message)
File "M:\bin\youtube-dl\youtube-dl.py", line 588, in to_stderr
print >>sys.stderr, message.encode(preferredencoding())
File "c:\Python27\lib\encodings\cp1252.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode characters in position 48-52: c
haracter maps to

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Mar 5, 2012

Perfectly working for me with 9c22892 and Linux.
Anyway, we have two bugs here, one in writing metadata to JSON and one in reporting the problem, I bet both related to encoding.

@pirate486743186
Copy link

@pirate486743186 pirate486743186 commented Nov 4, 2018

close this

too old, the video doesn't exist anymore, and probably fixed back then....

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.