its-rigs / Trolly

A Python wrapper around the Trello API. Provides a group of Python classes to represent Trello Objects. All classes come with basic Trello API method calls and are easily extensible to suit your needs. See the README for more details.
MIT License
100 stars 29 forks source link

Trouble with cyrillic encoding #16

Closed chrns closed 10 years ago

chrns commented 10 years ago

Hi, I try to get card info with cyrrilic symbols

client = Client(api_key, user_auth_token)
board = Board(client, boardID)
for card in board.get_cards():
    print card.get_card_information()

and

File "/usr/local/lib/python2.7/dist-packages/trolly/client.py", line 103, in fetch_json
    return json.loads(content.decode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 314: ordinal not in range(128)
its-rigs commented 10 years ago

Hi, I've just put in a fix to decode to utf-8 rather than the default ascii. I ran a test with some Cyrillic characters and they came through fine.

You can update with pip or by pulling from GitHub. Any issues let me know.