Skip to content

Commit 9afb254

Browse files
authored
🐛 fix(alembic): UnicodeDecodeError when list_templates (#8)
1 parent 9b2c561 commit 9afb254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nonebot_plugin_orm/migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def list_templates(config: AlembicConfig) -> None:
341341

342342
config.print_stdout("可用的模板:\n")
343343
for tempname in Path(config.get_template_directory()).iterdir():
344-
with (tempname / "README").open() as readme:
344+
with (tempname / "README").open(encoding="utf-8") as readme:
345345
synopsis = readme.readline().rstrip()
346346

347347
config.print_stdout(f"{tempname.name} - {synopsis}")

0 commit comments

Comments
 (0)