You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WIthout digging too deep into this, I see that the error is being thrown because a table is not being found in the get_game_logs function when it scrapes the referenced site. The if table: statement needs a correlating else statement for when the expected table is missing. I suspect that the link reference needs updating, possibly because the NBA season is over or maybe a change in how the site processes requests.
PGGstats = get_game_logs('Caris LeVert','2021-10-19','2022-04-11')
print(PGGstats)
runcell(0, 'C:/Users/aleka/Documents/test.py')
You searched for "Caris LeVert"
2 results found.
Traceback (most recent call last):
File ~\Documents\test.py:19 in
PGGstats = get_game_logs('Caris LeVert','2021-10-19','2022-04-11')
File ~\AppData\Roaming\Python\Python39\site-packages\basketball_reference_scraper\players.py:68 in get_game_logs
return df
UnboundLocalError: local variable 'df' referenced before assignment
The text was updated successfully, but these errors were encountered: