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

Unicode song names don't work #9

Open
thurask opened this issue Nov 1, 2015 · 2 comments
Open

Unicode song names don't work #9

thurask opened this issue Nov 1, 2015 · 2 comments

Comments

@thurask
Copy link
Contributor

thurask commented Nov 1, 2015

Example output:

steeb found 1 artists
...
0
[{u'artist': u'Ekatarina Velika', u'track': u'Oci Boje Meda', u'length': 211, u'link': u'http://pleer.com/tracks/13054337Aaiq', u'file': u'http://pleer.com/browser-extension/files/13054337Aaiq.mp3', u'bitrate': u'320 Kb/s', u'id': u'13054337Aaiq', u'size': 8481398}, {u'artist': u'EKV (Ekatarina Velika)', u'track': u'Oci boje meda (Live)', u'length': 267, u'link': u'http://pleer.com/tracks/130543447KK0', u'file': u'http://pleer.com/browser-extension/files/130543447KK0.mp3', u'bitrate': u'128 Kb/s', u'id': u'130543447KK0', u'size': 4280012}]
1
[]
2
[]
3
[]
4
[]
5
[]
6
[]
7
[]
8
[]
9
[]
10
[]
11
[]
12
[]
Traceback (most recent call last):
  File "C:\Miniconda3\envs\2devel\lib\site-packages\gui\spec.py", line 79, in handler
    action(event)   # just call the user function
  File "steeb\steeb.py", line 98, in download_all_songs
    download(downwin, song_url, song_title)
  File "steeb\steeb.py", line 110, in download
    print "Downloading: %s Bytes: %s" % (file_name, file_size)
  File "C:\Miniconda3\envs\2devel\lib\site-packages\clint\packages\colorama\ansitowin32.py", line 34, in write
    self.__convertor.write(text)
  File "C:\Miniconda3\envs\2devel\lib\site-packages\clint\packages\colorama\ansitowin32.py", line 115, in write
    self.write_and_convert(text)
  File "C:\Miniconda3\envs\2devel\lib\site-packages\clint\packages\colorama\ansitowin32.py", line 142, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "C:\Miniconda3\envs\2devel\lib\site-packages\clint\packages\colorama\ansitowin32.py", line 147, in write_plain_text
    self.wrapped.write(text[start:end])
  File "C:\Miniconda3\envs\2devel\lib\encodings\cp437.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u010d' in position 33: character maps to <undefined>
...
<app hangs here>

To reproduce, try any song with non-[A-Z][a-z][0-9], but the specific output above:

Artist: "Ekatarina Velika" > Album: "Ekatarina Velika" > Song: "Oči boje meda" > Download all

AFAIK, this is due to Python 2 being Python 2 w/r/t Unicode. Something about converting u"Oči boje meda" to u"O\u010di boje meda" and choking on that.

@KeizerDev
Copy link
Owner

Is it still in python2.7 or python2.8?

@thurask
Copy link
Contributor Author

thurask commented Nov 1, 2015

2.7.10, the latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants