From ac39e4331ed2aff55e40f25d33179dd72eeba57b Mon Sep 17 00:00:00 2001 From: qwerdvd <105906879+qwerdvd@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:11:38 +0800 Subject: [PATCH] fix --- starrail_damage_cal/mihomo/requests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/starrail_damage_cal/mihomo/requests.py b/starrail_damage_cal/mihomo/requests.py index 41d08ce..33c4e8f 100644 --- a/starrail_damage_cal/mihomo/requests.py +++ b/starrail_damage_cal/mihomo/requests.py @@ -21,7 +21,8 @@ async def get_char_card_info( ) as client: req = await client.get(f"/sr_info/{uid}") if save_path: - save_path.mkdir(parents=True, exist_ok=True) - with Path.open(save_path / uid / f"{uid!s}.json", "w") as file: + path = save_path / str(uid) + path.mkdir(parents=True, exist_ok=True) + with Path.open(path / f"{uid!s}.json", "w") as file: file.write(req.text) return convert(req.json(), type=MihomoData)