Server throttle error message
I was trying to run pgoapi with error massage as below. How can I set a delay time?
Traceback (most recent call last):
File "pokecli.py", line 139, in
import time and place time.sleep(1) before response_dict = req.call()
Btw. the lately added threadsafe modification:
req = api.create_request() #requests time.sleep(1) response_dict = req.call()
doesn't work well with this throttling. I suggest a shared section instead:
import threading
api_call_lock = threading.Lock()
and then
with api_call_lock: req = api.create_request() #requests time.sleep(1) response_dict = req.call()
if you're using many threads