osteenbergen / slackify

Slack bot to play/queue Spotify
13 stars 1 forks source link

Bug in queue removal with non-ascii characters #13

Closed jscharpff closed 8 years ago

jscharpff commented 8 years ago

I tried to remove Röyksopp - Sordid Affair from the queue, which caused the following error:

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/slackbot/dispatcher.py", line 33, in dispatch_msg func(Message(self._client, msg), *args) File "/home/osteenbergen/Documents/slackify/plugins/queue.py", line 75, in queue_remove message.reply('Removed %s' % deleted) File "/usr/local/lib/python2.7/dist-packages/slackbot/dispatcher.py", line 158, in reply text = self._gen_reply(text) File "/usr/local/lib/python2.7/dist-packages/slackbot/dispatcher.py", line 125, in _gen_reply return self._gen_at_message(text) File "/usr/local/lib/python2.7/dist-packages/slackbot/dispatcher.py", line 119, in _gen_at_message text = u'<@{}>: {}'.format(self._get_user_id(), text) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)

osteenbergen commented 8 years ago

Fixed in commit b589f65