From 39731d4ef256628acc91d86a6627593de2402e28 Mon Sep 17 00:00:00 2001 From: Shyromyro <101344529+Shyromyro@users.noreply.github.com> Date: Mon, 31 Mar 2025 05:57:29 +0200 Subject: [PATCH] fix: Specified utf-8 encoding when opening schema.sql --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 51f7433..ca1b94b 100644 --- a/bot.py +++ b/bot.py @@ -143,7 +143,8 @@ async def init_db(self) -> None: f"{os.path.realpath(os.path.dirname(__file__))}/database/database.db" ) as db: with open( - f"{os.path.realpath(os.path.dirname(__file__))}/database/schema.sql" + f"{os.path.realpath(os.path.dirname(__file__))}/database/schema.sql", + encoding = "utf-8" ) as file: await db.executescript(file.read()) await db.commit()