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

Teams() giving http error #464

Closed
arun1125 opened this issue Sep 10, 2020 · 4 comments · Fixed by #481
Closed

Teams() giving http error #464

arun1125 opened this issue Sep 10, 2020 · 4 comments · Fixed by #481
Assignees
Labels
bug Something isn't working
Milestone

Comments

@arun1125
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Sample code which causes an issue.

location = "here"
print("Example python code %s" % location)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu 18.04]
  • Sportsreference Version [e.g. 0.2.0 or commit hash if using code]

Additional context
Add any other context about the problem here. If applicable, also include links to any pages on www.sports-reference.com that are believed to be causing this issue.

@arun1125 arun1125 changed the title Hi team! Teams() giving http error Sep 10, 2020
@arun1125
Copy link
Author

arun1125 commented Sep 10, 2020

from sportsreference.nba.teams import Teams
from sportsreference.nba.schedule import Schedule

teams = Teams() gives an http error - "HTTPError: HTTP Error 404: Not Found"

When trying to get the schedule for 'BKN', 'CHA', 'PHX' I get the same http error
Schedule('BKN', year=2020).dataframe

@scaratozzolo
Copy link

Try this for teams

teams = Teams(year=2020)

For the schedules, the abbreviations you're using I don't believe are correct. Try, BRK, CHO, and PHO.

@arun1125
Copy link
Author

Thank you so much!

@roclark roclark self-assigned this Sep 27, 2020
@roclark roclark added the bug Something isn't working label Sep 27, 2020
@roclark roclark added this to the Release 0.6.0 milestone Sep 27, 2020
@roclark
Copy link
Owner

roclark commented Sep 27, 2020

Hey @arun1125, thanks for filing this issue! Apologies for not getting to this sooner. Sadly, it looks like this is a result of the continued pandemic as the delays in the NBA season have caused the logic used in the default season selector invalid, as the package assumes the 2021 season should be getting ready to begin at this point. @scaratozzolo gave an awesome workaround in the meantime (thanks Scott!!!) which looks like it is working for you, but I am finalizing a patch that handles the logic for this scenario and will push it out shortly.

Thank you both for working together to identify the issue and find a workaround! I will close this issues once everything works as expected and the original functionality is restored, ie:

from sportsreference.nba.teams import Teams

teams = Teams()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants