tellomichmich / PokeNoxBot

Slow but safe Pokemon GO Bot
23 stars 19 forks source link

Script crash when there is no pokeballs left #33

Closed Bolo30 closed 8 years ago

Bolo30 commented 8 years ago

Hi,

With latest version of script, it crash when fighting with zero pokeballs, error :

[] Going to fight with 190 485 ! [+] Wait for Pokemon fight... [+] Wait for Pokemon fight... [+] Wait for Pokemon fight... [] Seems to be a Rattata at 178 Traceback (most recent call last): File "c:\python27\pokenoxbot.py", line 1184, in PokemonWorkerReturn = PokemonWorker(PokemonPosition) File "c:\python27\pokenoxbot.py", line 396, in PokemonWorker PokeBallLeft = GetPokeballLeft() File "c:\python27\pokenoxbot.py", line 318, in GetPokeballLeft return int(ImgToString(img, "0123456789")) ValueError: invalid literal for int() with base 10: ''

When there is this error, i can see that "ocr.png" is a small blank picture and ocr.txt does not contain any word. So i think it's an ocr problem with tesseract ?

tellomichmich commented 8 years ago

I expected this bug. This should be ok now :)

tellomichmich commented 8 years ago

Thank's for all your reviews !