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

[DEV] NameError: global name 'item_stock' is not defined

Open josegrobles opened this issue 10 years ago • 2 comments

Expected Behavior

Capture Pokemon with catch rate < 0.30

Actual Behavior

Crash

Steps to Reproduce

  1. Use DEV version of the Bot
  2. Try to capture a Pokemon with catch rate < 0.30

Other Information

OS: Ubuntu 14.04 Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)

Traceback (most recent call last): File "pokecli.py", line 466, in <module> main() File "pokecli.py", line 68, in main bot.tick() File "/home/josegrobles/PBotNewDev4/PokemonGo-Bot/pokemongo_bot/__init__.py", line 85, in tick if worker.work() == WorkerResult.RUNNING: File "/home/josegrobles/PBotNewDev4/PokemonGo-Bot/pokemongo_bot/cell_workers/catch_visible_pokemon_worker.py", line 29, in work return self.catch_pokemon(self.bot.cell['catchable_pokemons'][0]) File "/home/josegrobles/PBotNewDev4/PokemonGo-Bot/pokemongo_bot/cell_workers/catch_visible_pokemon_worker.py", line 41, in catch_pokemon return_value = worker.work() File "/home/josegrobles/PBotNewDev4/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_catch_worker.py", line 198, in work if catch_rate[pokeball-1]<0.30 and item_stock[3]>0: NameError: global name 'item_stock' is not defined

josegrobles avatar Jul 30 '16 17:07 josegrobles

same here

c6652f228ad9543be7907f66f731d988a26676d0

hklcf avatar Jul 30 '16 17:07 hklcf

My problem has been solved in this PR #1878

josegrobles avatar Jul 30 '16 17:07 josegrobles