[dev] Bot using lucky eggs before reconnect after API exception
Expected Behavior
Bot should retry until API lets it through, not break on the pgoapi exception.
Actual Behavior
[16:16:23] Server is throttling, let's slow down a bit
[16:16:25] Server is throttling, let's slow down a bit
[16:16:26] Server is throttling, let's slow down a bit
[16:16:27] Server is throttling, let's slow down a bit
[16:16:28] Server is throttling, let's slow down a bit
[16:16:29]
[16:16:29] Ran for 0:00:12
[16:16:29] Total XP Earned: 0 Average: 0.00/h
[16:16:29] Travelled 0.00km
[16:16:29] Visited 0 stops
[16:16:29] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before
[16:16:29] Threw 0 pokeballs
[16:16:29] Earned 0 Stardust
[16:16:29]
[16:16:29] Highest CP Pokemon:
[16:16:29] Most Perfect Pokemon:
Traceback (most recent call last):
File "pokecli.py", line 442, in <module>
main()
File "pokecli.py", line 71, in main
bot.tick()
File ".../PokemonGo-Bot/pokemongo_bot/__init__.py", line 92, in tick
if worker.work() == WorkerResult.RUNNING:
File ".../PokemonGo-Bot/pokemongo_bot/cell_workers/evolve_all.py", line 19, in work
if not self._should_run():
File ".../PokemonGo-Bot/pokemongo_bot/cell_workers/evolve_all.py", line 73, in _should_run
response_dict_lucky_egg = self.bot.use_lucky_egg()
File ".../PokemonGo-Bot/pokemongo_bot/__init__.py", line 376, in use_lucky_egg
return self.api.use_item_xp_boost(item_id=301)
File ".../PokemonGo-Bot/venv/src/pgoapi/pgoapi/pgoapi.py", line 84, in function
return request.call()
File ".../PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 109, in call
raise ServerSideRequestThrottlingException('Server throttled too many times')
pgoapi.exceptions.ServerSideRequestThrottlingException: Server throttled too many times
Steps to Reproduce
Just switch locations and retry.
Other Information
OS: OSX 10.10.5 Git Commit: bdf2e7d9cc0b2fa5fb04bb9dc4f9f09f967cd9ea Python Version: Python 2.7.11
Similar to #2386
May be addressed by #2388
Not addresses by #2388, but I can fix this... will make a pull request shortly.
Cheers bud.
Looking at this, this exception is actually being raised by the bot itself; it's not an API exception that's being re-raised.
I'm curious if there's a reason for this to be there. @daybr3ak can you chime in?
Well the server is throttling you, but the bot is retrying past this 5 times. Beyond that, it's raising that error, because it's very probably an error coming from your configuration and not the bot
Any remedy for this? Haven't been able to load up the bot due to this.
Try to change the config parameter map_object_cache_time": 5, from 5 to 10
same problem after change map_object_cache_time": 5, from 5 to 10
Did you re ran pip install -r requirements.txt there is an updated module
Yes again [00:41:54] Server is throttling, let's slow down a bit [00:41:56] Server is throttling, let's slow down a bit [00:41:59] Server is throttling, let's slow down a bit
wihtout evolve the but is running but if i start with
"type": "EvolveAll", "config": { "evolve_all": "Caterpie,Weedle,Pidgey,Rattata,Spearow,Ekans,Sandshrew,Clefairy,Jigglypuff,Zubat,Oddish,Paras,Venonat,Diglett,Psyduck,Mankey,Poliwag,Abra,Bellsprout,Tentacool,Seel,Shellder,Gastly,Drowzee,Krabby,Horsea,Goldeen,Staryu,Omanyte,Kabuto", "evolve_cp_min": 1, "evolve_speed": 20, "use_lucky_egg": true
The bot is crashing after few seconds with
File ".../PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 109, in call
raise ServerSideRequestThrottlingException('Server throttled too many times')
pgoapi.exceptions.ServerSideRequestThrottlingException: Server throttled too many times
latest dev
The exception crash was addressed in ##2407 and seems to be primarily resolved in commit 3ef3fc796fbacfe8c70ec89ab30aef4a4164245d.
Unfortunately, there seems to be a new issue where the client will log in, pop a lucky egg, and then wait until reconnecting. It wastes lucky eggs, and can often do this 10 or 12 times in a row:
[21:14:36] Starting PokemonGo Bot....
[21:14:37] Using lucky egg ... you have 12
[21:14:56] Server is throttling, reconnecting in 30sec
[21:15:26] [x] Coordinates found in passed in location, not geocoding.
[21:15:26]
[21:15:26] Location Found: 43.63954594864653,-79.3757164478302 // Jack Leyton Ferry
[21:15:26] GeoPosition: (43.6395459, -79.3757164, 0)
[21:15:26]
[21:15:26] Attempting login to Pokemon Go.
[21:15:27] Login to Pokemon Go successful.
[21:15:27]
[21:15:27] --- TrainerName ---
[21:15:27] Level: 31 (Next Level: 188540 XP) (Total: 2811460 XP)
[21:15:27] Pokemon Captured: 5558 | Pokestops Visited: 6307
[21:15:27] Pokemon Bag: 152/300
[21:15:27] Items: 439/600
[21:15:27] Stardust: 320615 | Pokecoins: 30
[21:15:27] PokeBalls: 124 | GreatBalls: 20 | UltraBalls: 43
[21:15:27] RazzBerries: 49 | BlukBerries: 0 | NanabBerries: 0
[21:15:27] LuckyEgg: 12 | Incubator: 11 | TroyDisk: 5
[21:15:27] Potion: 1 | SuperPotion: 0 | HyperPotion: 0
[21:15:27] Incense: 22 | IncenseSpicy: 0 | IncenseCool: 0
[21:15:27] Revive: 0 | MaxRevive: 25
...
[21:17:22] Starting PokemonGo Bot....
[21:17:24] Using lucky egg ... you have 12
[21:17:42] Server is throttling, reconnecting in 30sec
[21:18:12] [x] Coordinates found in passed in location, not geocoding.
[21:18:12]
[21:18:12] Location Found: 43.63954594864653,-79.3757164478302 // Jack Leyton Ferry
[21:18:12] GeoPosition: (43.6395459, -79.3757164, 0)
[21:18:12]
[21:18:12] Attempting login to Pokemon Go.
[21:18:13] Login to Pokemon Go successful.
[21:18:14]
[21:18:14] --- TrainerName ---
[21:18:14] Level: 31 (Next Level: 188540 XP) (Total: 2811460 XP)
[21:18:14] Pokemon Captured: 5558 | Pokestops Visited: 6307
[21:18:14] Pokemon Bag: 152/300
[21:18:14] Items: 439/600
[21:18:14] Stardust: 320615 | Pokecoins: 30
[21:18:14] PokeBalls: 124 | GreatBalls: 20 | UltraBalls: 43
[21:18:14] RazzBerries: 49 | BlukBerries: 0 | NanabBerries: 0
[21:18:14] LuckyEgg: 12 | Incubator: 11 | TroyDisk: 5
[21:18:14] Potion: 1 | SuperPotion: 0 | HyperPotion: 0
[21:18:14] Incense: 22 | IncenseSpicy: 0 | IncenseCool: 0
[21:18:14] Revive: 0 | MaxRevive: 25
[21:18:14]
[21:18:14]
[21:18:18] Starting PokemonGo Bot....
[21:18:19] Using lucky egg ... you have 12
[21:18:37] Server is throttling, reconnecting in 30sec
[21:19:07] [x] Coordinates found in passed in location, not geocoding.
[21:19:07]
[21:19:07] Location Found: 43.63954594864653,-79.3757164478302 // Jack Leyton Ferry
[21:19:07] GeoPosition: (43.6395459, -79.3757164, 0)
[21:19:07]
[21:19:07] Attempting login to Pokemon Go.
[21:19:09] Login to Pokemon Go successful.
[21:19:10]
[21:19:10] --- TrainerName ---
[21:19:10] Level: 31 (Next Level: 188540 XP) (Total: 2811460 XP)
[21:19:10] Pokemon Captured: 5558 | Pokestops Visited: 6307
[21:19:10] Pokemon Bag: 152/300
[21:19:10] Items: 439/600
[21:19:10] Stardust: 320615 | Pokecoins: 30
[21:19:10] PokeBalls: 124 | GreatBalls: 20 | UltraBalls: 43
[21:19:10] RazzBerries: 49 | BlukBerries: 0 | NanabBerries: 0
[21:19:10] LuckyEgg: 12 | Incubator: 11 | TroyDisk: 5
[21:19:10] Potion: 1 | SuperPotion: 0 | HyperPotion: 0
[21:19:10] Incense: 22 | IncenseSpicy: 0 | IncenseCool: 0
[21:19:10] Revive: 0 | MaxRevive: 25
[21:19:10]
[21:19:10]
[21:19:14] Starting PokemonGo Bot....
[21:19:16] Using lucky egg ... you have 12
[21:19:39] Server is throttling, reconnecting in 30sec
Those are just a few, but you get the idea.
It eventually sorts itself out, but I've seen it waste at least 1 - 2 eggs trying.
I'd open a new issue, but since everyone's already here, figured I'd just post it and change the title.
Is the exception handler running after the EvolvePokemon task?
Btw, if you want me to just make a new issue and close this one, lemme know.
Also, everything works much nicer with "use_lucky_egg": false. Seems to avoid the reconnection loop.
Traceback (most recent call last):
File "pokecli.py", line 38, in
Hi, I am unsure if this is 100% related. But if you already have an egg active and run the script with use_lucky_egg:true, it will get into this loop:
[10:18:08] Using lucky egg ... you have 1 [10:18:28] Server is throttling, reconnecting in 30sec
Disabling egg fixes it.
Still occurring on commit 4a1f6493a78ce246aac81f243d2f562f22880529.
use_lucky_egg:false does fix the loop.
ok now i get only the spam
[16:16:23] Server is throttling, let's slow down a bit
[16:16:25] Server is throttling, let's slow down a bit
[16:16:26] Server is throttling, let's slow down a bit
[16:16:27] Server is throttling, let's slow down a bit
[16:16:28] Server is throttling, let's slow down a bit
But the bot is working
same error: "Server throttled too many times" when using Lucky egg after set Lucky Egg to false - starts working.