seemethere / nba_py

Python client for NBA statistics located at stats.nba.com
BSD 3-Clause "New" or "Revised" License
1.05k stars 256 forks source link

Getting connection error: 'Connection aborted.', error("(10060, 'WSAETIMEDOUT')",) #131

Open idohi opened 5 years ago

idohi commented 5 years ago

Hi, When I try to retrieve data, for example data about the players, using the command: player.PlayerSummary(<player_id>).info() after few times of success I get the following error: raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', error("(10060, 'WSAETIMEDOUT')",))

Please assist on this matter.

luzer commented 5 years ago

same

larryworm1127 commented 5 years ago

I got the same issue but was able to fix it after adding pauses between each request. I think the site stops you from requesting data from it after too many request in a short period of time.

idohi commented 5 years ago

@larryworm1127 For how long the pauses between each request? (I had tried it before but got inconsistent behavior, sometimes it worked and sometimes didn't).

larryworm1127 commented 5 years ago

I usually just put around 0.5 to 1 sec interval between each request and it seems to work ok.