From 7098c98dde16f1823929e62b0caed482cc54a4f5 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Wed, 11 Jun 2025 00:25:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Windows=20=E4=B8=8B?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E9=A1=B9=E7=9B=AE=E6=97=B6=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=20UnicodeDecodeError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes: #1548 --- astrbot/core/db/sqlite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astrbot/core/db/sqlite.py b/astrbot/core/db/sqlite.py index 3a4f6c1b8..2abba1de9 100644 --- a/astrbot/core/db/sqlite.py +++ b/astrbot/core/db/sqlite.py @@ -11,7 +11,9 @@ class SQLiteDatabase(BaseDatabase): super().__init__() self.db_path = db_path - with open(os.path.dirname(__file__) + "/sqlite_init.sql", "r") as f: + with open( + os.path.dirname(__file__) + "/sqlite_init.sql", "r", encoding="utf-8" + ) as f: sql = f.read() # 初始化数据库