Skip to content

Commit fcd305e

Browse files
committed
Merge pull request #7 from Stanford-Online/azimpradhan/hint-unicode-fix
Fix Unicode error in hints section
2 parents 2d5d0f7 + da862c5 commit fcd305e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

submit_and_compare/submit_and_compare.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,15 @@ def send_hints(self, submissions, suffix=''):
199199
decorated_hints = list()
200200

201201
if len(raw_hints) == 1:
202-
hint = 'Hint: ' + etree.tostring(raw_hints[0], encoding='unicode')
202+
hint = u'Hint: ' + etree.tostring(raw_hints[0], encoding='unicode')
203203
decorated_hints.append(hint)
204204
else:
205205
for i in range(len(raw_hints)):
206-
hint = 'Hint ({number} of {total}): {hint}'.format(
206+
hint = u'Hint ({number} of {total}): {hint}'.format(
207207
number=i + 1,
208208
total=len(raw_hints),
209-
hint=etree.tostring(raw_hints[i], encoding='unicode'))
209+
hint=etree.tostring(raw_hints[i], encoding='unicode'),
210+
)
210211
decorated_hints.append(hint)
211212

212213
hints = decorated_hints

0 commit comments

Comments
 (0)