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]: Road Games not returning from cumestatsplayergames when using "location_nulalble" parameter #418

Open
GargantuanB opened this issue Jan 27, 2024 · 1 comment
Assignees
Labels
endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service.

Comments

@GargantuanB
Copy link

NBA API Version

1.4.1

Issue

I've been attempting to pull player stats for road games using the cumestatsplayergame endpoint. However, whenever I attempt to build a dataframe with just road data, it comes back empty. I've attempted the exact same call with home games with no issue.

When I make a call without the "location_nullable" parameter, all games return, including home and road games.

I can still get the data I need without using the location parameter, but I wanted to report this in case there is an issue within the API

Code

Fails to return any data:

awayLog = cumestatsplayergames.CumeStatsPlayerGames(
player_id=203999,
league_id='00',
season='2022-23',
season_type_all_star='Regular Season',
location_nullable='Road'
).get_data_frames()[0][:100]

returns data without issue:

homeLog = cumestatsplayergames.CumeStatsPlayerGames(
player_id=203999,
league_id='00',
season='2023-24',
season_type_all_star='Regular Season',
location_nullable='Home'
).get_data_frames()[0][:100]

@GargantuanB GargantuanB added bug Something isn't working triage Researching into a possible bug labels Jan 27, 2024
@rsforbes rsforbes self-assigned this Jan 30, 2024
@rsforbes rsforbes added endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service. endpoint - known issue and removed endpoint - known issue labels Jan 30, 2024
@rsforbes
Copy link
Collaborator

@GargantuanB - I was successful in replicating your results. Unfortunately, the issue exists within the NBA API service itself; unrelated to the library.

When I looked at the results, both the home and road games all appear as road games regardless of actual location. I jumped on the NBA site and even they are throwing a 400 when attempting to use a location. Notice the malformed URL note the "Away%20%20" values within Location.

`https://stats.nba.com/stats//cumestatsplayergames?LeagueID=00&Location=Away%20%20&Outcome=&Season=2023&SeasonType=Regular%20Season&PlayerID=1641749&VsConference=&VsDivision=&VsTeamID=0`

So we have the following:

  1. home returns all games as road games.
  2. road returns nothing
  3. away, used on the NBA's website, returns 400.

I've tagged this as endpoint: third-party issue, indicating that it is beyond our control to resolve, and will leave it open should someone run into the same situation.

@rsforbes rsforbes removed bug Something isn't working triage Researching into a possible bug labels Jan 30, 2024
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