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
Attempting to get the box score for the 2012 all-star game returns an error about out of range indexing for a player's last name
Code to reproduce:
from basketball_reference_scraper.box_score import get_all_star_box_score
print(get_all_star_box_score(2012))
Traceback (most recent call last):
File "/home/jd/git/basketball_reference_scraper/test/test_box_scores.py", line 25, in test_get_all_star_box_score
d = get_all_star_box_score(2012)
File "/home/jd/git/basketball_reference_scraper/basketball_reference_scraper/box_scores.py", line 88, in get_all_star_box_score
stats_df = get_stats(dnp, ask_matches=False)
File "/home/jd/git/basketball_reference_scraper/basketball_reference_scraper/players.py", line 14, in get_stats
suffix = get_player_suffix(name)
File "/home/jd/git/basketball_reference_scraper/basketball_reference_scraper/utils.py", line 90, in get_player_suffix
initial = last_name_part[0].lower()
IndexError: string index out of range
The text was updated successfully, but these errors were encountered:
Looks like this is because get_player_suffix('Joe Johnson') is not working. Not sure if this worked before, but right now it's broken because makes a blank last name part of the suffix
Attempting to get the box score for the 2012 all-star game returns an error about out of range indexing for a player's last name
Code to reproduce:
The text was updated successfully, but these errors were encountered: