PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

AttributeError: 'PokemonGoBot' object has no attribute 'hunter_locked_target' #5906

Closed DeepJeep closed 7 years ago

DeepJeep commented 7 years ago

Expected Behavior

Bot running ;)

Actual Behavior

Bot not running ;)

Your FULL config.json (remove your username, password, gmapkey and any other private info)

Pretty much default config.json (derived from config.json.example), except for some threshold levels.

Output when issue occurred

2017-02-08 19:32:24,920 [ cli] [INFO] PokemonGO Bot v1.0 2017-02-08 19:32:24,934 [ cli] [INFO] commit: fda3ab8d 2017-02-08 19:32:24,938 [ cli] [INFO] Configuration initialized ... [2017-02-08 19:32:33] [PokemonGoBot] [INFO] #175 Togepi [2017-02-08 19:32:33] [PokemonGoBot] [INFO] #239 Elekid [2017-02-08 19:32:33] [PokemonGoBot] [INFO] [2017-02-08 19:32:33] [RandomAlivePause] [INFO] Next random alive pause at 19:39:42, for a duration of 0:02:45 [2017-02-08 19:32:33] [RandomPause] [INFO] Next random pause at 19:43:46, for a duration of 0:04:03 [2017-02-08 19:32:33] [RecycleItems] [INFO] Next forced item recycle at 19:34:45 [2017-02-08 19:32:34] [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information: [2017-02-08 19:32:34] [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics [2017-02-08 19:32:34] [PokemonGoBot] [INFO] Starting bot... [2017-02-08 19:32:35] [CollectLevelUpReward] [INFO] Received level up reward: ... [2017-02-08 19:32:35] [ cli] [INFO] [2017-02-08 19:32:35] [ cli] [INFO] Ran for 0:00:10 [2017-02-08 19:32:35] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h [2017-02-08 19:32:35] [ cli] [INFO] Travelled 0.00km [2017-02-08 19:32:35] [ cli] [INFO] Visited 0 stops [2017-02-08 19:32:35] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before () [2017-02-08 19:32:35] [ cli] [INFO] Threw 0 pokeballs [2017-02-08 19:32:35] [ cli] [INFO] Earned 0 Stardust [2017-02-08 19:32:35] [ cli] [INFO] Hatched eggs 0 [2017-02-08 19:32:35] [ cli] [INFO] Next egg hatches in 5.00 km [2017-02-08 19:32:35] [ cli] [INFO] [2017-02-08 19:32:35] [ cli] [INFO] Highest CP Pokemon: [2017-02-08 19:32:35] [ cli] [INFO] Most Perfect Pokemon: Traceback (most recent call last): File "pokecli.py", line 865, in main() File "pokecli.py", line 206, in main bot.tick() File "/home/dj/PokemonGo-Bot/pokemongo_bot/init.py", line 778, in tick if worker.work() == WorkerResult.RUNNING: File "/home/dj/PokemonGo-Bot/pokemongo_bot/cell_workers/catch_pokemon.py", line 55, in work if self.bot.hunter_locked_target != None: AttributeError: 'PokemonGoBot' object has no attribute 'hunter_locked_target' [2017-02-08 19:32:35] [sentry.errors] [ERROR] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/) Traceback (most recent call last): File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/home/dj/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "/usr/lib/python2.7/httplib.py", line 1057, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 895, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) [2017-02-08 19:32:35] [sentry.errors.uncaught] [ERROR] [u"AttributeError: 'PokemonGoBot' object has no attribute 'hunter_locked_target'", u' File "pokecli.py", line 865, in ', u' File "pokecli.py", line 206, in main', u' File "pokemongo_bot/init.py", line 778, in tick', u' File "pokemongo_bot/cell_workers/catch_pokemon.py", line 55, in work'] Mi 8. Feb 19:32:35 CET 2017 Pokebot configs/config.json configs/auth.json Stopped.

Steps to Reproduce

~/PokemonGo-Bot$ ./run.sh configs/config.json configs/auth.json

Other Information

OS: Ubuntu 16.04 Branch: master Git Commit: fda3ab8d Python Version: Python 2.7.12

Occured right after updating to last commit.

Any other relevant files/configs (eg: path files)

DeepJeep commented 7 years ago

Nevermind, modifying catch_pokemon.py according to #5904 solves it.