roclark / sportsipy

A free sports API written for python
MIT License
484 stars 187 forks source link

ncaab boxscore not pulling with IDs #711

Open danemiles opened 2 years ago

danemiles commented 2 years ago

Describe the bug boxscore is not consistently pulling game info (IndexError: list index out of range).

To Reproduce Sample code which causes an issue.

from sportsipy.ncaab.boxscore import Boxscore
game_data1 = Boxscore('2021-03-28-14-gonzaga')

#issue also exists for example from the readthedocs website:
game_data = Boxscore('2018-04-02-21-villanova')

Expected behavior Script should create detailed game boxscore.

Desktop (please complete the following information):

Additional context Wondering if this is error with HTML formatting. The following script does work:

from sportsipy.ncaab.boxscore import Boxscore
game_data2 = Boxscore('2016-02-02-michigan')

Code is being run in Google Colab.

jkoestner commented 2 years ago

i get the same issue, and think you are right it is something to do with format of html

jkoestner commented 2 years ago

i'll try to put a pull request at some point. it's actually not a bad fix. seems to be that section_header needs to be table_wrapper in scheme.

reaganking commented 2 years ago

Any solve @jkoestner? Don't want to open another issue as there are a handful already.

jkoestner commented 2 years ago

@reaganking yeah there is quite a few issues listed as you saw, and there was actually even an alternative solution that i didn't see #598.

It's a pretty easy fix, just changing 2 lines of code shown in #720.