Skip to content

Commit

Permalink
Fix error: UnicodeEncodeError: 'charmap' codec can't encode character…
Browse files Browse the repository at this point in the history
…s in position 0-1: character maps to <undefined> (#25)
  • Loading branch information
georgetian3 authored Jul 1, 2024
1 parent 5646e6e commit bba50a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ def append_hw_csv(fname, stu):
f[i] = info_str
else:
f.append(info_str)
csv.writer(open(fname, 'w')).writerows(f)
csv.writer(open(fname, 'w', encoding='utf8')).writerows(f)



def sync_hw(c):
Expand Down

0 comments on commit bba50a4

Please sign in to comment.