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 · 0 comments
Open

Defensehub Endpoint Not Working #478

CristofherJT opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working triage Researching into a possible bug

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Researching into a possible bug
Projects
None yet
Development

No branches or pull requests

1 participant