nba_api icon indicating copy to clipboard operation
nba_api copied to clipboard

[Bug]: DefenseHub not working?

Open ToTheHoop2023 opened this issue 2 years ago • 1 comments

NBA API Version

1.3.1

Issue

Trying to access the available data from the DefenseHub endpoint and not having much success. The error I am getting is "Expecting Value". I am working in Python and have included my code below. Whether I explicitly pass through all the parameters or not the error is the same. Am I overlooking something simple or is this broken? I saw a post from a couple of years ago but it wasn't clear to me if it was adrdessed, fixed etc.

Code

from nba_api.stats.endpoints import DefenseHub

df=DefenseHub(game_scope_detailed='Season', league_id='00', player_or_team='Team', player_scope='All Players', season='2023-24', season_type_playoffs='Regular Season')

ToTheHoop2023 avatar Nov 07 '23 22:11 ToTheHoop2023

I think instead of using the DefenseHub endpoint you can use LeagueDashTeamStats and change the MeasureType parameter to "Defense"

nathanzjin avatar Nov 16 '23 20:11 nathanzjin