scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 394 forks source link

Library does not support non-English characters #129

Closed evasyuk closed 7 years ago

evasyuk commented 7 years ago

When library receives text in russian bot fails to resolve msg at (line 49 in dispatcher.py)

def _dispatch_msg_handler(self, category, msg): pass

with error:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 44-47: ordinal not in range(128)

lins05 commented 7 years ago

Can you show the full traceback? I think we have unicode support covered in the tests https://github.com/lins05/slackbot/blob/b105feb22ef88d6950b6dbd6444d3518bea883bb/tests/functional/test_functional.py#L179-L188

vyahhi commented 7 years ago

@lins05 the following doesn't work:

@respond_to('привет', re.IGNORECASE)
def hello(message):
    message.react('wave')