Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

HTTPError: 503 Server Error: Service Unavailable for url #117

Open
justinthe opened this issue Apr 7, 2018 · 2 comments
Open

HTTPError: 503 Server Error: Service Unavailable for url #117

justinthe opened this issue Apr 7, 2018 · 2 comments

Comments

@justinthe
Copy link

Hi Guys,
When i tried to run this simple script:
from nba_py.player import PlayerList, PlayerGameLogs
players = PlayerList()
it came back to me with this message:

Error Message

_HTTPError Traceback (most recent call last)
in ()
----> 1 players = PlayerList()

~\Anaconda3\envs\NBA_PY\lib\site-packages\nba_py\player.py in init(self, league_id, season, only_current)
68 params={'LeagueID': league_id,
69 'Season': season,
---> 70 'IsOnlyCurrentSeason': only_current})
71
72 def info(self):

~\Anaconda3\envs\NBA_PY\lib\site-packages\nba_py_init_.py in _get_json(endpoint, params, referer)
83 headers=h)
84 # print _get.url
---> 85 _get.raise_for_status()
86 return _get.json()
87

~\Anaconda3\envs\NBA_PY\lib\site-packages\requests\models.py in raise_for_status(self)
933
934 if http_error_msg:
--> 935 raise HTTPError(http_error_msg, response=self)
936
937 def close(self):

HTTPError: 503 Server Error: Service Unavailable for url: http://stats.nba.com/stats/commonallplayers?LeagueID=00&Season=2016-17&IsOnlyCurrentSeason=1_

-End of Error Message-

I tried to click on the url at the very end of the error message just to check if the URL really was down or not, and it came back fine.

Any suggestions of what could be the problems? and what should i do?

Thank you,
Justin The

@rneu31
Copy link

rneu31 commented Apr 7, 2018 via email

@justinthe
Copy link
Author

Hi rneu31,
thanks for your reply.
I paste the url to my browser and it came back with a result, a long list of json text.
that was what confused me. i could access it through my browser, but couldn't through my code.

Regards,
JThe

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

No branches or pull requests

2 participants