dhmay / jamstats

Tools for making plots on roller derby scoreboard data and following live game data
https://jamstats.net
GNU General Public License v2.0
19 stars 2 forks source link

Jamstats does not work when using CRG beta builds #178

Open charlie-chaperon opened 3 months ago

charlie-chaperon commented 3 months ago

What version of the tools are you running, and how? I use Jamstats version 1.4.12, tested in both Windows 10 & Debian 12. CRG versions: 2025-beta2 and 2025-beta3

Is your feature request related to a problem? Please describe. Jamstats is not able to process data from the beta versions of the Scoreboard. Neither importing json files nor directly reading from the webserver works.

Instead, Jamstats stops with an error (json file) or I get this error message when trying to load the websocket:

jamstats version 1.4.12, by Damon May Connecting to server localhost, port 8000... Mode not specified. Inferred mode web Using theme white

Starting jamstats server... Point your browser to: http://localhost:8080/

Opened connection. 2024-08-14 13:56:02,196 | jamstats.io.scoreboard_server_io | INFO: Opened connection. Failed to update game data from server: invalid literal for int() with base 10: '2025-beta3' EXC: Traceback (most recent call last): EXC: File "jamstats\web\statserver.py", line 260, in index EXC: File "jamstats\data\json_to_pandas.py", line 29, in load_json_derby_game EXC: File "jamstats\data\json_to_pandas.py", line 133, in get_json_major_version EXC: ValueError: invalid literal for int() with base 10: '2025-beta3' Failed to update game data from server: invalid literal for int() with base 10: '2025-beta3'

Describe the solution you'd like If it's easy to fix, it would be great to make jamstats compatible with the beta versions.

However, this issue might be deeper rooted since the beta versions contain a lot of changes in the backend. Adapting for the beta might break jamstats in combination with the stable build (2023.7) of the Scoreboard.

Describe alternatives you've considered Creating a beta branch for Jamstats could help. Users can generate plots how they are used from the stable build. When the beta and its' features become standard there will be already a working jamstats version.

Additional context Like I already mentioned, there are a lot of changes in the backend of the CRG and new features. One of these features is a penalty box timing display. At the current version, it's used for information. It does not generate new data (like PBT sheets) yet.

dhmay commented 3 months ago

As you say, "fixing" the immediate problem is trivial, but there are probably a bunch more issues lurking in the beta json.

I don't have an easy way of generating realistic game data from the beta CRG. Could you please upload an example?

charlie-chaperon commented 3 months ago

Sure. You can use this game: testgame.json

It was generated with CRG 2025-beta2.

dhmay commented 2 months ago

@charlie-chaperon surprisingly, when I fixed the version-handling, everything else in that json seemed to work.

Can you build from main and give it a try? Or use the build artifacts here

charlie-chaperon commented 2 months ago

I was away last week but I found the time to test now. Since I removed python from my laptop at work, I could not build from main. However, I just imported the new script from main and it worked in Debian 12.

dhmay commented 2 months ago

Fixed in version 1.4.13.