From 35b6e0a35f59182ce6df7cf039e214426156498f Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Sun, 7 Sep 2025 21:19:23 +0200 Subject: [PATCH] Fix Windows not being able to open the wakatime cfg due to BOM existence --- utils/hackatime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/hackatime.py b/utils/hackatime.py index 1bed563..9f215c3 100644 --- a/utils/hackatime.py +++ b/utils/hackatime.py @@ -12,7 +12,8 @@ class Client: sys.exit(1) self.config = configparser.ConfigParser() - self.config.read(wakatime_config_path) + with open(wakatime_config_path, encoding="utf-8-sig") as f: + self.config.read_file(f) self.api_url = HACKATIME_URL self.api_key = self.config["settings"]["api_key"]