PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

issue #220 persists

Open fredrik-hellmangroup opened this issue 10 years ago • 5 comments

Expected Behavior

Walk to location, not throw error of unbound local variable

Actual Behavior

Problem persists in dev:

[#] Found fort 30e2a68d345441f2abfa141a964deabd.16 at distance 4.87814204604m Traceback (most recent call last): File "D:\Pokemon stuff\PokemonGo-Bot\pokecli.py", line 107, in main() File "D:\Pokemon stuff\PokemonGo-Bot\pokecli.py", line 104, in main bot.take_step() File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot__init__.py", line 31, in take_step self.stepper.take_step() File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot\stepper.py", line 58, in take_step self.work_at_position(position[0], position[1], position[2], True) File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot\stepper.py", line 103, in work_at_position self.bot.work_on_cell(cell, position, pokemon_only) File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot__init.py", line 54, in work_on_cell hack_chain = worker.work() File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot\cell_workers\seen_fort_worker.py", line 43, in work self.api.fort_details(fort_id=self.fort['id'], latitude=position[0], longitude=position[1]) UnboundLocalError: local variable 'position' referenced before assignment

Steps to Reproduce

after spinning at pokestop, it finds a new location and then error occures

Other Information

OS: Win10 x64 Git Commit: 6199d49

fredrik-hellmangroup avatar Jul 22 '16 21:07 fredrik-hellmangroup

Error seems to be ocurring between two locations:

  1. walking to: 59.327206, 18.067168
  2. spinn pokestop
  3. walk to Found fort 30e2a68d345441f2abfa141a964deabd.16

So problem getting fort location?

[#] Walking from (59.327804, 18.063748) to (59.327206, 18.067168) for approx. 50.0 seconds [#] Finished walking [#] Arrived at Pokestop [#] Now at Pokestop: Riksdagslejontvå - Spinning... [+] Loot: [+] 50 xp [+] 1x Pokeball [+] 1x Potion [#] PokeStop on cooldown. Time left: 299.105000019 seconds. [#] Found fort 30e2a68d345441f2abfa141a964deabd.16 at distance 4.87814204604m Traceback (most recent call last): File "D:\Pokemon stuff\PokemonGo-Bot\pokecli.py", line 107, in main() File "D:\Pokemon stuff\PokemonGo-Bot\pokecli.py", line 104, in main bot.take_step() File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot__init__.py", line 31, in take_step self.stepper.take_step() File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot\stepper.py", line 58, in take_step self.work_at_position(position[0], position[1], position[2], True) File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot\stepper.py", line 103, in work_at_position self.bot.work_on_cell(cell, position, pokemon_only) File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot__init.py", line 54, in work_on_cell hack_chain = worker.work() File "D:\Pokemon stuff\PokemonGo-Bot\pokemongo_bot\cell_workers\seen_fort_worker.py", line 43, in work self.api.fort_details(fort_id=self.fort['id'], latitude=position[0], longitude=position[1]) UnboundLocalError: local variable 'position' referenced before assignment

fredrik-hellmangroup avatar Jul 22 '16 21:07 fredrik-hellmangroup

i also get the same error.

[#] Something rustles nearby! Found fort 026904c7811b4c69bc7ded0440b24742.16 at distance 2.39626876429m Traceback (most recent call last): File "C:\Users\Initez\Desktop\GoBotDev\pokecli.py", line 107, in main() File "C:\Users\Initez\Desktop\GoBotDev\pokecli.py", line 104, in main bot.take_step() File "C:\Users\Initez\Desktop\GoBotDev\pokemongo_bot__init__.py", line 31, in take_step self.stepper.take_step() File "C:\Users\Initez\Desktop\GoBotDev\pokemongo_bot\stepper.py", line 58, in take_step self.work_at_position(position[0], position[1], position[2], True) File "C:\Users\Initez\Desktop\GoBotDev\pokemongo_bot\stepper.py", line 100, in work_at_position self.bot.work_on_cell(cell, position, pokemon_only) File "C:\Users\Initez\Desktop\GoBotDev\pokemongo_bot__init.py", line 52, in work_on_cell hack_chain = worker.work() File "C:\Users\Initez\Desktop\GoBotDev\pokemongo_bot\cell_workers\seen_fort_worker.py", line 43, in work self.api.fort_details(fort_id=self.fort['id'], latitude=position[0], longitude=position[1]) UnboundLocalError: local variable 'position' referenced before assignment

vincesmits avatar Jul 22 '16 21:07 vincesmits

running pip install --upgrade -r requirments.txt fixed it form me

vincesmits avatar Jul 22 '16 21:07 vincesmits

pushed something to fix this, please try again

douglascamata avatar Jul 22 '16 22:07 douglascamata

I assume with #58dcbcc by @douglascamata this should be fixed. Please feel free the open a new issue when necessary!

JulianMBr avatar Jul 23 '16 21:07 JulianMBr