swar / nba_api

An API Client package to access the APIs for NBA.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

players.get_players() appears to be missing the rookie class of 2022

lebrennie opened this issue · comments

Maybe I'm missing something because I'm not much of a programmer, but calling the following code doesn't include the class of 2022:

from nba_api.stats.static import players
player_dict = players.get_players()
print(player_dict)

@lebrennie - Could you include a sample of your output? I'm showing that v1.2.1 contains the rookies from the 2022 draft class:

49afe01#diff-b414ebeae7e726fc38b7b5d1a3daf728330ace96b4252eac1f710add6b01f53b

For example, if I do this:

from nba_api.stats.static import players
import pandas as pd

player_dict = players.get_players()
print(player_dict)

It of course outputs the whole player dictionary, but there's no Mathurin, no Eason, no Keegan Murray, no Jalen Duren, etc.

Also, I get an import error (ImportError: cannot import name 'playerindex' from 'nba_api.stats.endpoints' (C:\Users\Brennie\anaconda3\lib\site-packages\nba_api\stats\endpoints_init_.py) every time I try to import the playerindex endpoint. The other endpoints all seem to be fine.

I don't think I have an older version of nba_api or anything like that. I just did 'pip install nba_api' a few days ago so I should be up to date.

Apologies if I'm taking up time with a mistake that's on my end, but it doesn't seem to be working as far as I can tell.

My mistake, this is all working fine in v1.2.1. Sorry about that