mirror of
https://github.com/baiqwerdvd/ArknightsUID.git
synced 2025-05-05 03:23:45 +08:00
🚨修复无法json.dump的问题
This commit is contained in:
parent
1b36e462c5
commit
ad12bbe4e2
@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
import json
|
||||
|
||||
import msgspec
|
||||
from gsuid_core.data_store import get_res_path
|
||||
from gsuid_core.utils.error_reply import get_error
|
||||
from gsuid_core.utils.image.convert import convert_img
|
||||
@ -18,8 +19,7 @@ async def get_role_img(sr_uid: str):
|
||||
status = player_info.status
|
||||
uid = status.uid
|
||||
|
||||
player_save_path = get_res_path(['ArknightsUID', 'player'])
|
||||
player_save_path = get_res_path(['ArknightsUID', 'players'])
|
||||
|
||||
with open(player_save_path / f'{uid}.json', 'w', encoding='UTF-8') as f:
|
||||
json.dump(player_info, f, ensure_ascii=False, indent=4)
|
||||
|
||||
json.dump(json.loads(msgspec.json.encode(player_info)), f, ensure_ascii=False, indent=4)
|
||||
|
Loading…
x
Reference in New Issue
Block a user