From 11b53e5547a97dd89f2c7fc9fa24d599f549f802 Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Thu, 16 May 2024 04:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E6=B7=BB=E5=8A=A0=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GenshinUID/genshinuid_enka/mono/Character.py | 2 +- GenshinUID/genshinuid_gachalog/export_and_import.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/GenshinUID/genshinuid_enka/mono/Character.py b/GenshinUID/genshinuid_enka/mono/Character.py index eb04d0d3..3edf9e26 100644 --- a/GenshinUID/genshinuid_enka/mono/Character.py +++ b/GenshinUID/genshinuid_enka/mono/Character.py @@ -645,7 +645,7 @@ class Character: zf = self.power_list['A霜华矢·霜华绽发伤害'] v2 = int(zf['value'][index][:-1]) v1 = int(i[:-1]) - val.append(f'{v1 +v2}%') + val.append(f'{v1 + v2}%') self.power_list[power_name] = { 'name': power_name, diff --git a/GenshinUID/genshinuid_gachalog/export_and_import.py b/GenshinUID/genshinuid_gachalog/export_and_import.py index 37b9ef36..214f8416 100644 --- a/GenshinUID/genshinuid_gachalog/export_and_import.py +++ b/GenshinUID/genshinuid_gachalog/export_and_import.py @@ -31,6 +31,8 @@ async def import_gachalogs(history_url: str, type: str, uid: str) -> str: history_data = json.loads(data_bytes.decode()) except UnicodeDecodeError: history_data = json.loads(data_bytes.decode('gbk')) + except json.decoder.JSONDecodeError: + return '请传入正确的JSON格式文件!' if 'info' in history_data and 'uid' in history_data['info']: data_uid = history_data['info']['uid'] if data_uid != uid: