[DEV] NameError: global name 'item_stock' is not defined
Expected Behavior
Capture Pokemon with catch rate < 0.30
Actual Behavior
Crash
Steps to Reproduce
- Use DEV version of the Bot
- 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
same here
c6652f228ad9543be7907f66f731d988a26676d0
My problem has been solved in this PR #1878