You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only some of the abbreviations for player positions are working. Of these"(F)|(C)|(G)|(C-F)|(F-C)|(F-G)|(G-F)) only C, G, and F are valid.
Variable Name
Value
none default
center
C
center_forward
C-F
forward
F
forward_center
F-C
forward_guard
F-G
guard
G
guard_forward
G-F
When the code is run with the others I am met with this response:
season_game_stats = LeagueDashTeamStats(
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/endpoints/leaguedashteamstats.py", line 173, in init
self.get_request()
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/endpoints/leaguedashteamstats.py", line 183, in get_request
self.load_response()
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/endpoints/leaguedashteamstats.py", line 186, in load_response
data_sets = self.nba_response.get_data_sets()
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/library/http.py", line 129, in get_data_sets
results = raw_dict["resultSet"]
KeyError: 'resultSet'
Also as a follow-up, can we get PF (power forward), PG (point guard) and SF (small forward) abbreviations to work? Or do the (C-F)|(F-C)|(F-G)|(G-F) correspond to the positions I mentioned above?
NBA API Version
V1.4.1
Issue
Only some of the abbreviations for player positions are working. Of these"(F)|(C)|(G)|(C-F)|(F-C)|(F-G)|(G-F)) only C, G, and F are valid.
When the code is run with the others I am met with this response:
season_game_stats = LeagueDashTeamStats(
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/endpoints/leaguedashteamstats.py", line 173, in init
self.get_request()
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/endpoints/leaguedashteamstats.py", line 183, in get_request
self.load_response()
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/endpoints/leaguedashteamstats.py", line 186, in load_response
data_sets = self.nba_response.get_data_sets()
File "/Users/…/miniforge3/lib/python3.9/site-packages/nba_api/stats/library/http.py", line 129, in get_data_sets
results = raw_dict["resultSet"]
KeyError: 'resultSet'
Code
season_game_stats = LeagueDashTeamStats(
measure_type_detailed_defense='Opponent',
per_mode_detailed='PerGame',
player_position_abbreviation_nullable=‘F-C',
season='2023-24',
)
The text was updated successfully, but these errors were encountered: