diff --git a/Main.py b/Main.py index 4e7e5c01..c6041bdf 100644 --- a/Main.py +++ b/Main.py @@ -245,7 +245,7 @@ def main(args, seed=None): for location in world.get_filled_locations() if type(location.address) is int], "server_options": get_options()["server_options"] - }).encode("utf-8")) + }).encode("utf-8"), 9) if args.jsonout: jsonout["multidata"] = list(multidata) else: diff --git a/MultiServer.py b/MultiServer.py index 1a8243c0..3f949ddb 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1044,7 +1044,7 @@ async def main(args: argparse.Namespace): ctx.data_filename = tkinter.filedialog.askopenfilename(filetypes=(("Multiworld data","*multidata"),)) with open(ctx.data_filename, 'rb') as f: - jsonobj = json.loads(zlib.decompress(f.read()).decode("utf-8")) + jsonobj = json.loads(zlib.decompress(f.read()).decode("utf-8-sig")) for team, names in enumerate(jsonobj['names']): for player, name in enumerate(names, 1): ctx.player_names[(team, player)] = name @@ -1052,7 +1052,7 @@ async def main(args: argparse.Namespace): ctx.remote_items = set(jsonobj['remote_items']) ctx.locations = {tuple(k): tuple(v) for k, v in jsonobj['locations']} except Exception as e: - logging.error('Failed to read multiworld data (%s)' % e) + logging.exception('Failed to read multiworld data (%s)' % e) return ip = args.host if args.host else Utils.get_public_ipv4()