From fa2dbd1bb56ea708690de8557ced95891d5af89f Mon Sep 17 00:00:00 2001 From: shushuzn <132275809+shushuzn@users.noreply.github.com> Date: Tue, 14 Apr 2026 20:09:44 +0800 Subject: [PATCH] fix: use utf-8 encoding when reading .env file in load_env() On Windows, Path.open() defaults to the system ANSI code page (cp1252). If the .env file contains UTF-8 characters, decoding fails with 'gbk codec can't decode byte 0x94'. Specify encoding='utf-8' explicitly to ensure consistent behavior across platforms. --- tools/skills_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/skills_tool.py b/tools/skills_tool.py index 6ff54230..40a6990e 100644 --- a/tools/skills_tool.py +++ b/tools/skills_tool.py @@ -111,7 +111,7 @@ def load_env() -> Dict[str, str]: if not env_path.exists(): return env_vars - with env_path.open() as f: + with env_path.open(encoding="utf-8") as f: for line in f: line = line.strip() if line and not line.startswith("#") and "=" in line: