-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I only have a test size of 1, but it seems like for a multistage event, if one of the events hasn't started yet. I'm not sure why this would happen. The following is the traceback:
Traceback (most recent call last):
File "C:\Users\invat\OneDrive\Documents\Python\SmashStream\SmashGGSupport.py", line 40, in
sso = SmashGGSupportObject( tournamentName, event)
File "C:\Users\invat\OneDrive\Documents\Python\SmashStream\SmashGGSupport.py", line 10, in init
self.players = self.smash.tournament_show_players(self.tournamentID,self.event)
File "C:\Python36\lib\site-packages\pysmash\smashgg.py", line 51, in tournament_show_players
return tournaments.show_players(tournament_name, tournament_params, event)
File "C:\Python36\lib\site-packages\pysmash\tournaments.py", line 61, in show_players
bracket_players = brackets.players(bracket_id)
File "C:\Python36\lib\site-packages\pysmash\brackets.py", line 13, in players
response = _filter_player_response(response)
File "C:\Python36\lib\site-packages\pysmash\brackets.py", line 83, in _filter_player_response
entrants = response['entities']['entrants']
KeyError: 'entrants'
As a work around for myself atm, I've changed response['entities']['entrants'] to response['entities'].get('entrants') and return an empty list if that returns None. This seems to get me by for now. Haven't had time to trace it all the way down yet, but does the library try to obtain players for each phase/pool/bracket of the event separately? If so I wonder if Smash.gg doesn't even give that field until after that stage is "Primed with players" from the previous stage, as once all the previous stages are complete the problem goes away and the entrants key magically appears in the response.
Sorry if this was long winded.