Hexxeh / spotify-websocket-api

Spotify Websocket API is a fully open source Spotify library based on the WebSocket API used in the Spotify Web beta
395 stars 67 forks source link

'ÅÄÖ' not supported #43

Closed jackbillstrom closed 10 years ago

jackbillstrom commented 11 years ago

I get this when I search for a song that includes one or more from these letters: Å,Ä,Ö.

Search tracks: mamma sa

   [1] Mamma sa - Maskinen
   [2] Oh Mamma Sa - Radio - Adoo
Traceback (most recent call last):
  File "respotify.py", line 340, in <module>
    command_loop()
  File "respotify.py", line 306, in command_loop
    command_map[command_name][0](command[1:])
  File "respotify.py", line 209, in command_search
    set_current_playlist(results)
  File "respotify.py", line 133, in set_current_playlist
    display_playlist()
  File "respotify.py", line 126, in display_playlist
    print prefix + "[" + str(index) + "] " + track.getName() + " - " + track.getArtists(nameOnly=True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 8: ordinal not in range(128)

Would be great in someone know a easy fix. I'll look into it in a couple of days if no one succeeds and commit from a branch. Cheers!

jackbillstrom commented 10 years ago

Working in current version, done.