Skip to content

Commit

Permalink
submit_output: Decode input contents as utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
jackrosenthal committed Oct 8, 2024
1 parent 131dc6d commit dd3d8f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion algobowl/controllers/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ def submit_output(self, to_group, output_file=None):
problem = problemlib.load_problem(comp)

try:
output = problem.parse_output(to_group.input.data.file, StringIO(contents))
output = problem.parse_output(
StringIO(to_group.input.data.file.read().decode("utf-8")),
StringIO(contents),
)
except problemlib.FileFormatError as e:
return {
"status": "error",
Expand Down

0 comments on commit dd3d8f4

Please sign in to comment.