Skip to content

Commit

Permalink
Added encoding="utf-8". Without it, it failed reading the file on my …
Browse files Browse the repository at this point in the history
…setup (Windows 10).
  • Loading branch information
Clément Besnier committed Jun 3, 2022
1 parent 66a2145 commit 4e54579
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

for clf in classifiers:
for pth in progressbar(list(Path("results", clf).glob("*.tsv"))[:]):
with open(pth) as f:
with open(pth, "r", encoding="utf-8") as f:
res = []
for row in f:
res += [[[a.strip() for a in x.split()] for x in row.split("\t")]]
Expand Down

0 comments on commit 4e54579

Please sign in to comment.