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

[Bug]: ScoreBoard endpoint + ScoreBoardv2 endpoint do not work #464

Closed
leandronesi opened this issue Sep 9, 2024 · 2 comments · Fixed by #465
Closed

[Bug]: ScoreBoard endpoint + ScoreBoardv2 endpoint do not work #464

leandronesi opened this issue Sep 9, 2024 · 2 comments · Fixed by #465
Assignees
Labels
bug Something isn't working

Comments

@leandronesi
Copy link

NBA API Version

1.5.0

Issue

I tried to use both Scoreboard and ScoreBoardV2 endpoints, but i did not succeed in make them work.

The error I'm encountering is list index out of range.

My code run with a lot of endpoints, so i really don't understand why these are not working at all.

Please can you help?

Code

from nba_api.stats.endpoints import ScoreboardV2
import pandas as pd
def fetch_nba_schedule(date='2023-10-25'):
# Call the ScoreboardV2 endpoint
scoreboard = ScoreboardV2(
league_id='00', # '00' for NBA
game_date=date
)

# Get data frames
data_frames = scoreboard.get_data_frames()
return data_frames

data_frames = fetch_nba_schedule(date='2023-10-25')

@leandronesi leandronesi added bug Something isn't working triage Researching into a possible bug labels Sep 9, 2024
@rsforbes rsforbes self-assigned this Sep 12, 2024
@a3jeu
Copy link

a3jeu commented Oct 9, 2024

I have the same issue

if isinstance(self.data["headers"][0], str): ~~~~~~~~~~~~~~~~~~~~^^^ IndexError: list index out of range

@rsforbes rsforbes removed the triage Researching into a possible bug label Oct 9, 2024
@rsforbes
Copy link
Collaborator

rsforbes commented Oct 9, 2024

@a3jeu / @leandronesi - I have a coded up a fix for this. Other issues need resolving. Release expected in 24hrs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants