From f7c33405161fe772b9307fff9c5f6a11f4b18697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20S=C3=A1nchez?= Date: Fri, 18 Oct 2024 12:43:07 +0100 Subject: [PATCH] Use utf-8 encoding when loading institutions Thanks to @TheLime1 for pointing this out --- blackboard_sync/institutions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blackboard_sync/institutions.py b/blackboard_sync/institutions.py index cf32b43..9f9f8f4 100644 --- a/blackboard_sync/institutions.py +++ b/blackboard_sync/institutions.py @@ -82,8 +82,9 @@ class Institution(BaseModel): def load() -> list[Institution]: db = [] + db_file = Path(__file__).parent / UNIVERSITY_DB - with (Path(__file__).parent / UNIVERSITY_DB).open() as f: + with db_file.open(encoding='utf-8') as f: db = json.load(f) return [Institution(**uni) for uni in db]