From 8e86994a116ac865aba350080eede3dd8ffad419 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 8 Mar 2026 11:34:23 +0800 Subject: [PATCH] fix: specify UTF-8 encoding for subprocess in init_database - subprocess.run with text=True uses system encoding (GBK on Windows) - Causes UnicodeDecodeError when reading SQL files with UTF-8 content - Explicitly set encoding='utf-8' to fix the issue Fixes #605 --- MindSpider/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MindSpider/main.py b/MindSpider/main.py index 6ab21fa64..617c31a08 100644 --- a/MindSpider/main.py +++ b/MindSpider/main.py @@ -151,7 +151,8 @@ def initialize_database(self) -> bool: [sys.executable, str(init_script)], cwd=self.schema_path, capture_output=True, - text=True + text=True, + encoding='utf-8' ) if result.returncode == 0: