Skip to content

Commit 37d54ee

Browse files
committed
add encoding=constants.default_encoding in report()
1 parent 528fbef commit 37d54ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/electiondata/userinterface/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def report(
704704
output_location, f"{file_prefix}_{et}_{nk_name}.errors"
705705
)
706706
with open(out_path, "a") as f:
707-
f.write(out_str)
707+
f.write(out_str, encoding=constants.default_encoding)
708708
print(f"{et.title()} errors{and_warns} written to {out_path}")
709709

710710
# process name keys with only warnings (unless warnings suppressed)
@@ -726,7 +726,7 @@ def report(
726726
output_location, f"{file_prefix}_{et}_{nk_name}.warnings"
727727
)
728728
with open(out_path, "a") as f:
729-
f.write(out_str)
729+
f.write(out_str, encoding=constants.default_encoding)
730730
print(f"{et.title()} warnings written to {out_path}")
731731

732732
# define return dictionary with reported keys set to {} and other keys preserved

0 commit comments

Comments
 (0)