Closed Fortage closed 5 years ago
Can you please provide some more information? There is also a log file for get5 located in /logs/
that would be very helpful to see the additional errors, and where it's trying to calculate percentage. I assume it's going to be on HSP as I've had this problem before.
Thank you! It seems to be a problem with ratings and I assume the backup and restore rounds may have set the roundsplayed to zero. I think it should be a simple fix to check that. I'll look more into it. Thanks!
Oh yeah I see now. When trying to calculate the rating for that one match, it's looking at the one users' kills/deaths/rounds played. Since (by the looks of it) the backup nuked the rounds played, it's trying to divide 1 by 0, causing the error. A wrapper just needs to be put around the rating and just return zero if we divide by zero.
Take a look at commit a992725. That should fix the bug and just zero out any ratings that cannot be calculated to zero.
Yes, statistics show. But then I had a question, and the statistics that the player has accumulated in this match and which does not appear in the match list, does it miss?
If a match is ever cancelled, not finalised, or forfeit, it should not include in the stats, since the match was never played. I wanted some of these stats to update in real-time, but I guess I forgot to include Match.cancelled == 1
in the query: https://github.com/PhlexPlexico/get5-web/blob/master/get5/leaderboard.py#L80
Will update this as well later today, good catch!
Updated in development!
Closing this as it has been resolved. If issue persists with this exact problem, feel free to re-open. If not, create another bug. Thanks! 🤙
Describe the bug
Does not enter statistics after backup. Write on site
"Sorry, unexpected error: float division by zero"
Which Build Is this happening on master?
To Reproduce Steps to reproduce the behavior:
Expected behavior I expected normal write statistics.