diff --git a/db.py b/db.py index 335d8ae..13777a6 100644 --- a/db.py +++ b/db.py @@ -85,7 +85,7 @@ async def init_table_schema(): utils.logger.info("[init_table_schema] begin init mysql table schema ...") await init_mediacrawler_db() async_db_obj: AsyncMysqlDB = media_crawler_db_var.get() - async with aiofiles.open("schema/tables.sql", mode="r") as f: + async with aiofiles.open("schema/tables.sql", mode="r", encoding="utf-8") as f: schema_sql = await f.read() await async_db_obj.execute(schema_sql) utils.logger.info("[init_table_schema] mediacrawler table schema init successful")