Open michaelmendelsohn opened 3 years ago
Fixed by slowing down my code!
if(i%24==0 and i>0): print('pausing') time.sleep(120) print('unpaused')
Also encountered a 503 Error
Traceback (most recent call last):
File "/home/klian/anaconda3/envs/py3/lib/python3.7/site-packages/riotwatcher/Handlers/ThrowOnErrorHandler.py", line 18, in after_request
response.raise_for_status()
File "/home/klian/anaconda3/envs/py3/lib/python3.7/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: https://na1.api.riotgames.com/lol/match/v4/matches/3770335085
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Riot Data Pull v2(match_loop).py", line 122, in <module>
testStatsDF=getMatchHistory(summonerName="Souporsecret", max_matches=m)
File "Riot Data Pull v2(match_loop).py", line 44, in getMatchHistory
match_detail = watcher.match.by_id(my_region, gameId)
File "/home/klian/anaconda3/envs/py3/lib/python3.7/site-packages/riotwatcher/_apis/league_of_legends/MatchApiV4.py", line 32, in by_id
self.by_id.__name__, region, MatchApiV4Urls.by_id, match_id=match_id
File "/home/klian/anaconda3/envs/py3/lib/python3.7/site-packages/riotwatcher/_apis/NamedEndpoint.py", line 36, in _request_endpoint
self._endpoint_name, method_name, region, url, query
File "/home/klian/anaconda3/envs/py3/lib/python3.7/site-packages/riotwatcher/_apis/BaseApi.py", line 51, in raw_request
region, endpoint_name, method_name, url, response
File "/home/klian/anaconda3/envs/py3/lib/python3.7/site-packages/riotwatcher/Handlers/ThrowOnErrorHandler.py", line 20, in after_request
raise ApiError(*err.args, request=err.request, response=err.response)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: https://na1.api.riotgames.com/lol/match/v4/matches/3770335085
HTTPError: 504 Server Error: Gateway Timeout for url: https://na1.api.riotgames.com/lol/match/v4/timelines/by-match/3789498433
HTTPError Traceback (most recent call last) ~\AppData\Local\Programs\Python\Python39\lib\site-packages\riotwatcher\Handlers\ThrowOnErrorHandler.py in after_request(self, region, endpoint_name, method_name, url, response) 17 try: ---> 18 response.raise_for_status() 19 except requests.HTTPError as err:
~\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py in raise_for_status(self) 942 if http_error_msg: --> 943 raise HTTPError(http_error_msg, response=self) 944
HTTPError: 504 Server Error: Gateway Timeout for url: https://na1.api.riotgames.com/lol/match/v4/timelines/by-match/3789498433