Skip to content

Commit

Permalink
Fix csv file writing on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiamarcolini committed Aug 28, 2020
1 parent 5d313d2 commit 2e6674a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/histolab/tiler.py
Expand Up @@ -617,7 +617,7 @@ def _save_report(
for values in zip(filenames, np.array(highest_score_tiles)[:, 0])
]

with open(report_path, "w+") as f:
with open(report_path, "w+", newline="") as f:
w = csv.DictWriter(f, fieldnames=header, lineterminator=os.linesep)
w.writeheader()
w.writerows(rows)
Expand Down

0 comments on commit 2e6674a

Please sign in to comment.