Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defensehub Endpoint Not Working #478

Open
CristofherJT opened this issue Nov 14, 2024 · 1 comment
Open

Defensehub Endpoint Not Working #478

CristofherJT opened this issue Nov 14, 2024 · 1 comment
Labels
endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service.

Comments

@CristofherJT
Copy link

NBA API Version

1.6.1

Issue

Every time I try to retrieve data from the defensehub endpoint the function fails with a JSONDecodeError. I tried many ways to fix it but no luck.

Code

import pandas as pd
from nba_api.stats.endpoints import defensehub

def get_shot_defense_data(seasons):
shot_defense_data = []

for season in seasons:
    shot_defense_logs = defensehub.DefenseHub(season=season, player_or_team='Team').get_data_frames()[0]
    shot_defense_data.append(shot_defense_logs)

combined_shot_data = pd.concat(shot_defense_data, ignore_index = True)

return combined_shot_data
@CristofherJT CristofherJT added bug Something isn't working triage Researching into a possible bug labels Nov 14, 2024
@rsforbes rsforbes added endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service. and removed bug Something isn't working triage Researching into a possible bug labels Dec 14, 2024
@rsforbes
Copy link
Collaborator

@CristofherJT @- The NBA has been retiring several endpoints. This appears to be one of those. I have it on my backlog to do some testing in this area. This isn't the first, second, or even the fifth one I've seen. 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service.
Projects
None yet
Development

No branches or pull requests

2 participants