Skip to content

Commit b64c8b1

Browse files
authoredApr 9, 2025
fix: Specify utf-8 encoding when opening database schema (#107)
1 parent e14aee9 commit b64c8b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎bot.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ async def init_db(self) -> None:
143143
f"{os.path.realpath(os.path.dirname(__file__))}/database/database.db"
144144
) as db:
145145
with open(
146-
f"{os.path.realpath(os.path.dirname(__file__))}/database/schema.sql"
146+
f"{os.path.realpath(os.path.dirname(__file__))}/database/schema.sql",
147+
encoding = "utf-8"
147148
) as file:
148149
await db.executescript(file.read())
149150
await db.commit()

0 commit comments

Comments
 (0)
Please sign in to comment.