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)