From 4e3c9d115c0ea12b311528db9d5067c9964fb437 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Mon, 15 Jan 2024 21:53:08 +0100 Subject: [PATCH] open and close config file with utf-8 encoding --- src/iSponsorBlockTV/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iSponsorBlockTV/helpers.py b/src/iSponsorBlockTV/helpers.py index 772b9c3..0627c29 100644 --- a/src/iSponsorBlockTV/helpers.py +++ b/src/iSponsorBlockTV/helpers.py @@ -72,7 +72,7 @@ class Config: def __load(self): try: - with open(self.config_file, "r") as f: + with open(self.config_file, "r", encoding="utf-8") as f: config = json.load(f) for i in config: if i not in config_file_blacklist_keys: @@ -108,7 +108,7 @@ class Config: print("Blank config file created") def save(self): - with open(self.config_file, "w") as f: + with open(self.config_file, "w", encoding="utf-8") as f: config_dict = self.__dict__ # Don't save the config file name config_file = self.config_file