rahims / SoCo

SoCo (Sonos Controller) is a simple Python class that allows you to programmatically control Sonos speakers.
329 stars 34 forks source link

[BUG] Encode Error with 'get_favorite_radio_stations' #20

Closed avjui closed 11 years ago

avjui commented 11 years ago

Here is the Traceback

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    items = sonos.get_favorite_radio_stations(start=0, max_items=9)
  File "/mnt/Media/Downloads/Homematic/lib/sonos/soco.py", line 840, in get_favorite_radio_stations
    return self.__get_radio_favorites(RADIO_STATIONS, start, max_items)
  File "/mnt/Media/Downloads/Homematic/lib/sonos/soco.py", line 858, in __get_radio_favorites
    dom = XML.fromstring(response)
  File "<string>", line 106, in XML
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 3372: ordinal not in range(128)

This error come by parsing the name 'Ö2 Radio'

KennethNielsen commented 11 years ago

@avjui I think that was one of the errors that I addressed with a pull request from yesterday (https://github.com/rahims/SoCo/blob/master/soco.py#L859). Could you try and fetch the latest master and see if the error still occurs. If it does please let me know where in the browse radio stations I can find this station.

avjui commented 11 years ago

It seem your are right so we close this. Thanks