Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sportsipy.nba.teams.Teams() doesn't work #668

Open
craigrenn opened this issue Oct 26, 2021 · 4 comments · May be fixed by #669
Open

sportsipy.nba.teams.Teams() doesn't work #668

craigrenn opened this issue Oct 26, 2021 · 4 comments · May be fixed by #669

Comments

@craigrenn
Copy link

craigrenn commented Oct 26, 2021

I'm getting the message:
The requested page returned a valid response, but no data could be found. Has the season begun, and is the data available on www.sports-reference.com?

after running
sportsipy.nba.teams.Teams()

  • Sportsipy Version: 0.6.0

This issues appears to have happened previously, and seems to be happening again.

@rdelga80
Copy link

rdelga80 commented Nov 2, 2021

I think the issue is here: 5dd02a6#diff-bb130adb2a857770807dce6d6286b53d21bf939e37d12a3fdbf7b5d1e784a55eR85-R86

teams_list = utils._get_stats_table(doc, 'div#div_totals-team')
opp_teams_list = utils._get_stats_table(doc, 'div#div_totals-opponent')

Is being led by an extra div_ in the tag search? Should it be:

teams_list = utils._get_stats_table(doc, 'div#totals-team')
opp_teams_list = utils._get_stats_table(doc, 'div#totals-opponent')

@rdelga80 rdelga80 linked a pull request Nov 3, 2021 that will close this issue
@chrisbubernak
Copy link

chrisbubernak commented Nov 20, 2021

I think this proposed fix is nearly correct however the elements with these ids are tables not divs so i think what you actually want is:

teams_list = utils._get_stats_table(doc, '#totals-team')
opp_teams_list = utils._get_stats_table(doc, '#totals-opponent')

Patching the library like this locally has resolved the issue for me.

@seramex
Copy link

seramex commented Jan 12, 2022

I'm seeing the same thing now. First time I've ever used the nba modules.

@FunPolice67
Copy link

FunPolice67 commented Jan 15, 2022

I am getting the same error as well as of 1/14/2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants