Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default encoding to utf-8 #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Set default encoding to utf-8 #62

wants to merge 1 commit into from

Conversation

m1pl
Copy link

@m1pl m1pl commented Apr 19, 2017

Without this, fetchActiveUsers will silently fail if usernames contain non-ascii characters.

File "/usr/src/slackbot-workout/User.py", line 30, in __init__
   print "New user: " + self.real_name + " (" + self.username + ")"
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 23: ordinal not in range(128)

This will cause the bot to never choose a winner for the current exercise.

slackbot [15:06] 
NEXT LOTTERY FOR PLANKS IS IN 19 MINUTES
slackbot [15:25] 
NEXT LOTTERY FOR CHAIR DIPS IS IN 22 MINUTES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant