roclark / sportsipy

A free sports API written for python
MIT License
482 stars 188 forks source link

NCAAB box score list index out if range #652

Open tarik0219 opened 3 years ago

tarik0219 commented 3 years ago

from sportsipy.ncaab.boxscore import Boxscore Boxscore('2021-04-03-17-baylor')

Gettting an error for list index out of range when trying to get the boxscore of games for the 2021 season. https://www.sports-reference.com/cbb/boxscores/2021-04-03-17-baylor.html

Here is an example of the box score that I want to pull

brandonbrown122 commented 2 years ago

I am also having this problem. Have you found a solution?

fmathews11 commented 2 years ago

I'm also having this issue!

lucas-nelson-uiuc commented 2 years ago

Same issue here :')

joshbliss commented 2 years ago

Just had this issue as well, it appears that any 2021 boxscores have different HTML than previous seasons at least from looking at it myself. If you look at the API, def _parse_record(self, field, boxscore, index) in boxscore.py tries to return the records of the teams that played but it isn't able to find any records from the PyQuery object, so there is an empty list that it is trying to index (at least this is where mine gets stuck). If you don't need the records, you can edit this function locally as a temporary fix, the path for me on linux is: /home/insertUsernameHere/.local/lib/python3.8/site-packages/sportsipy/ncaab/boxscore.py