We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a32c33 commit 54b0cc1Copy full SHA for 54b0cc1
sc2reader/scripts/sc2json.py
@@ -34,7 +34,12 @@ def main():
34
args = parser.parse_args()
35
36
factory = sc2reader.factories.SC2Factory()
37
- factory.register_plugin("Replay", toJSON(indent=args.indent))
+ try:
38
+ factory.register_plugin(
39
+ "Replay", toJSON(encoding=args.encoding, indent=args.indent)
40
+ ) # legacy Python
41
+ except TypeError:
42
+ factory.register_plugin("Replay", toJSON(indent=args.indent))
43
replay_json = factory.load_replay(args.path[0])
44
print(replay_json)
45
0 commit comments