Skip to content

Commit 263f8bf

Browse files
therealmitchconnorsElucidation
authored andcommitted
Handle UnicodeEncodeError on print. (Elucidation#27)
Merge in: * Handle UnicodeEncodeError on print.
1 parent e82d185 commit 263f8bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chessbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def logInfoPerSubmission(submission, count, count_actual, is_processed=False):
158158
is_proc = ' P'
159159
try:
160160
print("#%d Submission(%s%s): %s" % (count, submission.id, is_proc, submission))
161-
except UnicodeDecodeError as e:
161+
except (UnicodeDecodeError, UnicodeEncodeError) as e:
162162
print("#%d Submission(%s%s): <ignoring unicode>" % (count, submission.id, is_proc))
163163

164164

0 commit comments

Comments
 (0)