You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to execute the script for the third of fourth time in a row, I get an HTTP Error 429 from urllib.
Here is the full traceback :
Traceback (most recent call last):
File "extract_occurrences.py", line 75, in <module>
html = get_range(search_term, start_date, end_date)
File "extract_occurrences.py", line 51, in get_range
num_results, success = get_num_results(search_term, date, date)
File "extract_occurrences.py", line 19, in get_num_results
handler = opener.open(request)
File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib/python3.8/urllib/request.py", line 563, in error
result = self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: Too Many Requests
I didn't have a look a the code, or at the header of the request response, but putting a waiting time between each requests should fix this
The text was updated successfully, but these errors were encountered:
When trying to execute the script for the third of fourth time in a row, I get an HTTP Error 429 from urllib.
Here is the full traceback :
I didn't have a look a the code, or at the header of the request response, but putting a waiting time between each requests should fix this
The text was updated successfully, but these errors were encountered: