nba_api
nba_api copied to clipboard
[Bug]: Class - PlayerPositionAbbreviationNullable in nba_api/docs/nba_api/stats/library/paramters.md is not working
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.
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'
Code
season_game_stats = LeagueDashTeamStats( measure_type_detailed_defense='Opponent', per_mode_detailed='PerGame', player_position_abbreviation_nullable=‘F-C', season='2023-24', )
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?
I can test the validity of the calls and parameters; however, it's at the descretion of the NBA as to what's supported.
On Thu, Feb 15, 2024, 1:43 PM girishm010 @.***> wrote:
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?
— Reply to this email directly, view it on GitHub https://github.com/swar/nba_api/issues/427#issuecomment-1946924577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGO32WV4G7K2N5OSBFSGYLYTZJMJAVCNFSM6AAAAABDJRSNYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWHEZDINJXG4 . You are receiving this because you were assigned.Message ID: @.***>