From 9f3ae2767375b9d17d21e923c34559a49bd07a24 Mon Sep 17 00:00:00 2001 From: Marco Ciotola <848222@stud.unive.it> Date: Tue, 3 Mar 2020 13:39:25 +0100 Subject: [PATCH] [fix] Fix opening voter file as binary for unicodecsv reading --- helios/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helios/models.py b/helios/models.py index 29596f5..6babb10 100644 --- a/helios/models.py +++ b/helios/models.py @@ -734,7 +734,7 @@ class VoterFile(models.Model): voter_stream = io.BytesIO(content) else: close = True - voter_stream = open(self.voter_file.path, "r") + voter_stream = open(self.voter_file.path, "rb") #reader = unicode_csv_reader(voter_stream) reader = unicodecsv.reader(voter_stream, encoding='utf-8') -- GitLab