Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

[BUG] Error in Team Leaderboard URL #145

Closed
xe1os opened this issue Oct 15, 2019 · 11 comments
Closed

[BUG] Error in Team Leaderboard URL #145

xe1os opened this issue Oct 15, 2019 · 11 comments
Labels
bug Something isn't working

Comments

@xe1os
Copy link

xe1os commented Oct 15, 2019

Describe the bug
Error while viewing Team Leaderboard (/leaderboard)

Which Build
Both

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Leaderboards'
  2. Click on 'Team Leaderboard'
  3. See error 'Sorry, unexpected error: 'NoneType' object has no attribute 'id'

Expected behavior
Should show the team leaderboard for all matches irrespective of season.

Additional context
We should be able to see top team across all matches, like we have player leaderboard for all matches (/leaderboard/players)

@xe1os xe1os added the bug Something isn't working label Oct 15, 2019
@PhlexPlexico
Copy link
Owner

This is most likely do to an error in your data, as seen in issue #134. Please provide a log file when the issue currently happens, as it is far easier to debug. Thanks!

@xe1os
Copy link
Author

xe1os commented Oct 16, 2019

This is most likely do to an error in your data, as seen in issue #134. Please provide a log file when the issue currently happens, as it is far easier to debug. Thanks!

get5.log

get5.log.2019-10-11.log

@PhlexPlexico thank you

@PhlexPlexico
Copy link
Owner

PhlexPlexico commented Oct 16, 2019

You currently have matches that are cancelled, or a match that has been completed with no winner.
dTeamStandings[winningTeam.name]['teamid'] = winningTeam.id AttributeError: 'NoneType' object has no attribute 'id'

Please run select * from `match` where winner is NULL and update those records accordingly.

@PhlexPlexico PhlexPlexico added the on hold Something that is awaiting response. label Oct 19, 2019
@xe1os
Copy link
Author

xe1os commented Oct 22, 2019

You currently have matches that are cancelled, or a match that has been completed with no winner.
dTeamStandings[winningTeam.name]['teamid'] = winningTeam.id AttributeError: 'NoneType' object has no attribute 'id'

Please run select * from `match` where winner is NULL and update those records accordingly.

@PhlexPlexico i have updated the values for records with NULL information in the database using your query select * from `match` where winner is NULL.

Still getting the same error :(

@PhlexPlexico
Copy link
Owner

Can you post your latest log again after causing this error? It seems you have some data problems in your database that's causing this error, as I cannot reproduce.

@PhlexPlexico
Copy link
Owner

Also, would you mind running select * from map_stats where winner is NULL? It's possible the winners were never set in the map stats.

@PhlexPlexico PhlexPlexico removed the on hold Something that is awaiting response. label Oct 22, 2019
@mrc4tt
Copy link

mrc4tt commented Oct 22, 2019

Aha. it's because, if you are setting "forfeit" to the team (without connecting to gameserver e.g) it will say that.

Example from my database:
screen

@PhlexPlexico
Copy link
Owner

Uno momento, making one fix for this as well within the query.

@PhlexPlexico
Copy link
Owner

6ece304 Should fix that now.

@mrc4tt
Copy link

mrc4tt commented Oct 22, 2019

6ece304 Should fix that now.

I can confirm it works! ;) /close this =D

@PhlexPlexico
Copy link
Owner

Latest push to master will also show winner in the map stats as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants