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 @@ async def get_fight_prop(self) -> Dict: 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: