roclark / sportsipy

A free sports API written for python
MIT License
475 stars 189 forks source link

HTTPError #750

Open pmcnair opened 1 year ago

pmcnair commented 1 year ago

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

To Reproduce Sample code which causes an issuTraceback (most recent call last): File "c:\Users\603686\Desktop\Python_tutorials\nfl.py", line 325, in pred_games_df, comp_games_df = prep_test_train(current_week, weeks, year) File "c:\Users\603686\Desktop\Python_tutorials\nfl.py", line 309, in prep_test_train schedule_df = get_schedule(year) File "c:\Users\603686\Desktop\Python_tutorials\nfl.py", line 17, in get_schedule week_scores = Boxscores(weeks, year) File "C:\Users\603686\AppData\Local\Programs\Python\Python310\lib\site-packages\sportsipy\nfl\boxscore.py", line 1466, in init self._find_games(week, year, end_week) File "C:\Users\603686\AppData\Local\Programs\Python\Python310\lib\site-packages\sportsipy\nfl\boxscore.py", line 1810, in _find_games page = self._get_requested_page(url) File "C:\Users\603686\AppData\Local\Programs\Python\Python310\lib\site-packages\sportsipy\nfl\boxscore.py", line 1561, in _get_requested_page return pq(url) File "C:\Users\603686\AppData\Local\Programs\Python\Python310\lib\site-packages\pyquery\pyquery.py", line 223, in init html = url_opener(url, kwargs) File "C:\Users\603686\AppData\Local\Programs\Python\Python310\lib\site-packages\pyquery\openers.py", line 78, in url_opener return _requests(url, kwargs) File "C:\Users\603686\AppData\Local\Programs\Python\Python310\lib\site-packages\pyquery\openers.py", line 62, in _requests raise HTTPError(resp.url, resp.status_code, is there error im getting when trying to run code following the active state tutorial. I have acloned the repo and am able to pull up to date data so im confused where the url data is failing any help is appreciated.

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):

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.