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

change scary 'interruption can corrupt your data' text in 'stop task' dialog on exiting a live connection to scoreboard #184

Closed erevrav closed 1 hour ago

erevrav commented 3 days ago

What version of the tools are you running, and how? v3.4.14 directly connected to scoreboardserver

Is your feature request related to a problem? Please describe. When jamstats is connected to a scoreboardserver (not importing data from a jsonfile), clicking the 'Stop' button in the jamstats window presents a scary popup that 'interruption can corrupt your data'.

Describe the solution you'd like When you've got a live connection, there's no threat of data corruption on exit (I hope). Having a warning here seems appropriate, but just the first sentence seems sufficient: "Are you sure you want to stop the task?"

Describe alternatives you've considered I dunno. we could actually corrupt some data somewhere, if it indeed might? (kidding! I can imagine scenarios where jamstats could foul scoreboard data & I don't really even like joking about that.)

dhmay commented 2 days ago

I know you're kidding, but it's impossible for JamStats to foul the scoreboard data -- it's a read-only connection. The most harm I can imagine JamStats doing to the scoreboard is essentially DOSing it if too many people ran JamStats at once, but I've done a lot to minimize even that impact.

dhmay commented 2 days ago

To the problem you reported, those messages are coming from PyInstaller, the packaging software I'm using to turn JamStats, which is essentially a commandline tool, into an EXE you can double-click to start up.

I can't figure out if there's any way I can control the content of those messages. I've tried googling all the messages in that window in your screenshot, and nothing. That seems super weird to me... why doesn't everyone who packages a tool with PyInstaller get exactly those same messages and want to change them?

I'll keep looking, but for now I don't have any leads.

dhmay commented 2 days ago

@erevrav can you try the executable in this PR build? I changed the "console" option in PyInstaller from False to True. My hope is that if it's got a console to spew scary messages to it won't do it in a prominent window, but I don't know.

I got rid of my last Windows box, so I don't have anything in the house I can try Windows-only changes like this on.

erevrav commented 2 days ago

nope, that presents a popup that's identical to the previous one. the pyinstaller-provided window has this:

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

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

Opened connection. 2024-11-25 22:23:28,210 | jamstats.io.scoreboard_server_io | INFO: Opened connection.

and the cmd window where jamstats started has:

jamstats version 1.4.14, by Damon May Starting GUI... Created parser. Adding args... Added args. Parsing args...

so, maybe I can't get what I'd like here. That's a weird choice, PyInstaller, that's a weird choice.

dhmay commented 1 hour ago

Hey, I think I did it! I was wrong, earlier -- the dire warnings weren't coming from PyInstaller, but from Gooey, the package I'm using to wrap my commandline interface with a window. I got ChatGPT to help me figure out how to monkeypatch Gooey. I changed that dire message to simply: "Are you sure you want to stop?"

Should be fixed in this EXE. Can you please verify, @erevrav ? Any other messages you'd like changed while I'm at it? It's super easy now.

dhmay commented 1 hour ago

Closing and merging... just reopen this one if you want any more messages changed.