Skip to content

Commit 38be2bb

Browse files
committed
fix(bulk-upload): use TextIOWrapper to read csv files
1 parent bdaa99d commit 38be2bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

local_units/bulk_upload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def process_row(self, data: Dict[str, Any]) -> bool:
7373
return False
7474

7575
def run(self) -> None:
76-
with self.bulk_upload.file.open("r") as file:
76+
with self.bulk_upload.file.open("rb") as csv_file:
77+
file = io.TextIOWrapper(csv_file, encoding="utf-8")
7778
csv_reader = csv.DictReader(file)
7879
fieldnames = csv_reader.fieldnames or []
7980

0 commit comments

Comments
 (0)