jekirl / poketrainer

The original Pokemon Go bot
Other
120 stars 58 forks source link

[Error] Server-Side throttling #449

Open sftwninja opened 8 years ago

sftwninja commented 8 years ago
2016-08-08 00:14:48,584 [   pokecli] [ERROR] Error in main loop Request throttled by server... slow down man, restarting at location: (x, y,, 0)
Traceback (most recent call last):
  File "pokecli.py", line 166, in main
    api.main_loop()
  File "/pgoapi/pgoapi.py", line 1175, in main_loop
    self.spin_all_forts_visible()
  File "/pgoapi/pgoapi.py", line 672, in spin_all_forts_visible
    map(lambda x: "via:%f,%f" % (x[0]['latitude'], x[0]['longitude']), destinations[1:]))
  File "/pgoapi/pgoapi.py", line 571, in walk_to
    self.heartbeat()
  File "/pgoapi/pgoapi.py", line 487, in heartbeat
    self.use_lucky_egg()
  File "/pgoapi/pgoapi.py", line 524, in use_lucky_egg
    response = self.call()
  File "/pgoapi/pgoapi.py", line 271, in call
    response = request.request(self.get_api_endpoint(), self._req_method_list[id(gevent.getcurrent())], player_position)
  File "/pgoapi/rpc_api.py", line 141, in request
    raise ServerSideRequestThrottlingException("Request throttled by server... slow down man")
ServerSideRequestThrottlingException: Request throttled by server... slow down man

Even giving a sleep of about 1.5 seconds seems to trip the throttling brake.

Disabling the use of Lucky eggs fixed it for me. I'm not sure why. It doesn't look like that portion makes more than one API call.

skydrome commented 8 years ago

try a slower walk speed or increase _map_objects_rate_limit

sftwninja commented 8 years ago

My walk speed is currently 5. That's not what's doing it. This is an error code 52 from Niantic's API. From fiddling with it, something about the Lucky Egg method is breaking it. I've stepped away or I'd take a closer look.