question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NBA Teams() do not work

See original GitHub issue

The example code for NBA team does not work

from sportsipy.nba.teams import Teams

teams = Teams()
for team in teams:
    print(team.name, team.abbreviation)

I get an error:

(Pdb) Teams(year=year)
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?

(Pdb) Teams(year=2001)
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?

(Pdb) Teams()
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?

(Pdb) from sportsipy.nba.teams import Teams
(Pdb) teams = Teams()
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?

Not sure when this started happening

This is because

from pyquery import PyQuery as pq

(Pdb) doc = pq(SEASON_PAGE_URL % year)
(Pdb) doc
[<html.no-js>]

(Pdb) teams_list = utils._get_stats_table(doc, 'div#all_team-stats-base')
(Pdb) teams_list
(Pdb) opp_teams_list = utils._get_stats_table(doc, 'div#all_opponent-stats-base')
(Pdb) opp_teams_list

They are returns nothing

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
joewilajcommented, Jun 5, 2021

The entire nba package is no longer functional. ‘no data could be found’

1reaction
mikeschoppcommented, Sep 20, 2021

Hey @roclark thanks again for pulling this together! I’ve reinstalled the package and I’m unfortunately running into the same issue. Is there another version I should be using?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Work in Progress: Fixing each of the NBA's winless teams
The same can't be said for the Los Angeles Lakers, Oklahoma City Thunder, Orlando Magic, and Philadelphia 76ers. All of whom are winless...
Read more >
Issues · roclark/sportsipy - GitHub
Issues list. Teams class from the NBA package seems to be broken. NCAAB Boxscores still not responding.
Read more >
The NBA would NOT work in Louisville - On3.com
Except that ranks 24th out of the 30 NBA teams. Now, some people would argue comparing Louisville to Memphis is a mistake because...
Read more >
Teams Isolation | Stats - NBA.com
TEAM GP POSS FREQ% PPP PTS FGM FGA FG% EFG% FT FREQ% TOV... Dallas Mavericks 32 14.2 13.4 1.07 15.2 5.3 11.3 46.4 53.3...
Read more >
When I run the sportsipy.nba.teams.Teams function I am ...
Returns the following: The requested page returned a valid response, but no data could be found. Has the season begun, and is the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found