Closed TechSupportJosh closed 5 years ago
okay, what kind of server are you monitoring?
This would have been a CSGO server, and he fixed one of the problems I was encountering with the script.
output of stats
CPU NetIn NetOut Uptime Maps FPS Players Svms +-ms ~tick
10.0 0.0 0.0 1349 1 102.55 0 1.43 0.16 0.01
Interesting. my CSGO servers always returned 3 lines. I will test this tomorrow and merge it if everything is fine. Thanks for the pull request.
Glad to help 👍
Okay took me a bit longer than promised to do this, but it's done now. Thank you very much for the pull request.
[14/04/2019 17:47] ERROR test handler 132: not enough values to unpack (expected 3, got 2) Traceback (most recent call last): File "main.py", line 117, in handler names, values, _ = [a.split() for a in stats.splitlines()] ValueError: not enough values to unpack (expected 3, got 2)
Looks like stats does not always return 3 lines. I've modified the code to look at any amount of lines and then deal with the first two.