You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: I'm using the latest version of the JDK.
EDIT: I see that this is likely a GSON error to do with the way it reads the JSON file. I've never used GSON before so I don't really know where to start looking. Again, any and all help appreciated.
I hope above and below is enough detail for you to help. If any additional detail is required please do say.
I'm running my algos from run_match.py here is a normal console out until we start just getting errors the error (I haven't yet been able to make it run correctly):
C:\Users\nopeyoudontgettoseemyname\AppData\Local\Continuum\anaconda3\python.exe C:/Users/nopeyoudontgettoseemyname/PycharmProjects/C1GamesStarterKit-master/scripts/run_match.py
Is windows: True
Algo 1: C:\Users\nopeyoudontgettoseemyname\PycharmProjects\C1GamesStarterKit-master\python-algo\run.ps1
Algo 2: C:\Users\nopeyoudontgettoseemyname\PycharmProjects\C1GamesStarterKit-master\python-algo\run.ps1
Start run a match
Starting Engine: August_17_2020
Starting single worker game.
Looking for Config file at:
C:\Users\nopeyoudontgettoseemyname\PycharmProjects\C1GamesStarterKit-master/game-configs.json
C:\Users\nopeyoudontgettoseemyname\PycharmProjects\C1GamesStarterKit-master\python-algo\run.ps1
C:\Users\nopeyoudontgettoseemyname\PycharmProjects\C1GamesStarterKit-master\python-algo\run.ps1
Saving replay: C:\Users\nopeyoudontgettoseemyname\PycharmProjects\C1GamesStarterKit-master\replays\p1-20-10-2020-13-23-49-1603196629720-2003786728.replay
P1 Name: python-algo seasonMode:7
P2 Name: python-algo seasonMode:7
Waiting for: 3000 before starting first turn.
Done waiting starting first turn.
Here's the first error. The rest are in a similar style. I'm not familiar with java so I don't really know how to fix this, any and all help appreciated:
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
at com.google.gson.Gson.fromJson(Gson.java:899)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.c1games.terminal.game.Parser.processInputForPlayer(Parser.java:131)
at com.c1games.terminal.game.Parser.processInputBuild(Parser.java:115)
at com.c1games.terminal.game.GameMain.runLoop(GameMain.java:318)
at com.c1games.terminal.game.GameMain.startGame(GameMain.java:175)
at com.c1games.terminal.game.GameMain.main(GameMain.java:150)
at com.c1games.terminal.Terminal.main(Terminal.java:141)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:80)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.fromJson(Gson.java:887)
... 8 more
Invalid command, couldn't json for player 1 : {"p2Units":[[],[],[],[],[],[],[],[]],"turnInfo":[0,99,-1,198],"p1Stats":[40.0,515.0,55.8,12],"p1Units":[[],[],[],[],[],[],[],[]],"p2Stats":[40.0,515.0,55.8,13],"events":{"selfDestruct":[],"breach":[],"damage":[],"shield":[],"move":[],"spawn":[],"death":[],"attack":[],"melee":[]}}
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
at com.google.gson.Gson.fromJson(Gson.java:899)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.c1games.terminal.game.Parser.processInputForPlayer(Parser.java:131)
at com.c1games.terminal.game.Parser.processInputDeploy(Parser.java:239)
at com.c1games.terminal.game.GameMain.runLoop(GameMain.java:324)
at com.c1games.terminal.game.GameMain.startGame(GameMain.java:175)
at com.c1games.terminal.game.GameMain.main(GameMain.java:150)
at com.c1games.terminal.Terminal.main(Terminal.java:141)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:80)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.fromJson(Gson.java:887)
... 8 more
Winner (p1 perspective, 1 = p1 2 = p2): 2
Waiting to exit finished game.
sent game end playerIndex: 0
sent game end playerIndex: 1
sent game end playerIndex: 0
sent game end playerIndex: 1
Done waiting now exiting finished game.
Hard Exiting Now
Closing stream
Closing playerIndex: 0
Closing stream
Closing playerIndex: 1
Exited for loop
End of main
Closing stream
Closing stream
Finished running match
Process finished with exit code 0
I'm also using a modified game-configs.json (modified to do what I hope is make it compatible with season 7 (rather than season 3 which it came with)) file. I thought changing it might fix the issue, but the error was the same before and after the changes (if any of the changes I've made here are going to cause problems please do say.):
EDIT: I'm using the latest version of the JDK.
EDIT: I see that this is likely a GSON error to do with the way it reads the JSON file. I've never used GSON before so I don't really know where to start looking. Again, any and all help appreciated.
I'm writing my algorithm in python on windows.
p1-20-10-2020-13-23-49-1603196629720-2003786728.txt
Above is the replay file of the game (converted from
.replay
to.txt
).I hope above and below is enough detail for you to help. If any additional detail is required please do say.
I'm running my algos from
run_match.py
here is a normal console out until we start just getting errors the error (I haven't yet been able to make it run correctly):Here's the first error. The rest are in a similar style. I'm not familiar with java so I don't really know how to fix this, any and all help appreciated:
I'm also using a modified
game-configs.json
(modified to do what I hope is make it compatible with season 7 (rather than season 3 which it came with)) file. I thought changing it might fix the issue, but the error was the same before and after the changes (if any of the changes I've made here are going to cause problems please do say.):The text was updated successfully, but these errors were encountered: