diff --git a/pyproject.toml b/pyproject.toml index 3cf90db..5a20073 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "starrail_damage_cal" -version = "1.9.5" +version = "1.9.6" description = "For StarRail Role Damage Cal" authors = [ {name = "qwerdvd", email = "105906879+qwerdvd@users.noreply.github.com"}, diff --git a/starrail_damage_cal/to_data.py b/starrail_damage_cal/to_data.py index 6430a3c..9a14e4f 100644 --- a/starrail_damage_cal/to_data.py +++ b/starrail_damage_cal/to_data.py @@ -1,4 +1,3 @@ -import json from pathlib import Path from typing import Dict, List, Tuple, Union @@ -375,10 +374,7 @@ async def get_data( if save_path: path = save_path / str(uid) path.mkdir(parents=True, exist_ok=True) - path.mkdir(parents=True, exist_ok=True) - with Path.open( - path / f"{char_data.avatarName}.json", "wb", encoding="UTF-8" - ) as file: + with Path.open(path / f"{char_data.avatarName}.json", "wb") as file: _ = file.write(msgjson.encode(char_data)) return char_data, char_data.avatarName