New Pokemon Optimizer crashes the Bot (Maybe because of buddy assignment)
Expected Behavior
Bot run normally
Actual Behavior
Bot crashes right after starting
Your FULL config.json (remove your username, password, gmapkey and any other private info)
http://pastebin.com/h4KvRDUY (The Pokemon Optimizer config is from the example file. Bot run normally without that part)
Output when issue occurred
[2016-09-20 17:32:20] [PokemonGoBot] [INFO] Starting bot...
[2016-09-20 17:32:23] [CollectLevelUpReward] [INFO] Received level up reward:
[2016-09-20 17:32:23] [IncubateEggs] [INFO] Eggs incubating: [4.80/5.0 km] (Eggs left: [(2.0, 8)], Incubating: 1)
[2016-09-20 17:32:25] [ cli] [INFO]
[2016-09-20 17:32:25] [ cli] [INFO] Ran for 0:00:46
[2016-09-20 17:32:25] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h
[2016-09-20 17:32:25] [ cli] [INFO] Travelled 0.00km
[2016-09-20 17:32:25] [ cli] [INFO] Visited 0 stops
[2016-09-20 17:32:25] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
[2016-09-20 17:32:25] [ cli] [INFO] Threw 0 pokeballs
[2016-09-20 17:32:25] [ cli] [INFO] Earned 0 Stardust
[2016-09-20 17:32:25] [ cli] [INFO] Hatched eggs 0
[2016-09-20 17:32:25] [ cli] [INFO] Next egg hatches in 0.20 km
[2016-09-20 17:32:25] [ cli] [INFO]
[2016-09-20 17:32:25] [ cli] [INFO] Highest CP Pokemon:
[2016-09-20 17:32:25] [ cli] [INFO] Most Perfect Pokemon:
Traceback (most recent call last):
File "pokecli.py", line 843, in <module>
main()
File "pokecli.py", line 202, in main
bot.tick()
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/pokemongo_bot/__init__.py", line 721, in tick
if worker.work() == WorkerResult.RUNNING:
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_optimizer.py", line 170, in work
if self.buddy["id"] != new_buddy.unique_id:
KeyError: 'id'
[2016-09-20 17:32:25] [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 "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/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)
[2016-09-20 17:32:25] [sentry.errors.uncaught] [ERROR] [u"KeyError: 'id'", u' File "pokecli.py", line 843, in <module>', u' File "pokecli.py", line 202, in main', u' File "pokemongo_bot/__init__.py", line 721, in tick', u' File "pokemongo_bot/cell_workers/pokemon_optimizer.py", line 170, in work']
I haven't assigned any buddy yet. Maybe that's the cause of the error.
Steps to Reproduce
Other Information
OS: Arch Linux ARM Branch: dev Git Commit: d1e983f45f4687580c2a305591dd9178477be444 Python Version: 2.7.12
@Anakin5 Please have a look.
@Anakin5 May I ask you something? Will Pokemon Optimizer claim the candies from buddy, or it just do buddy assignment? Because I have no way to get version 0.37 of the official app so I can't claim the candies outside the bot.
Yes it is claiming the candies too
hotfix is waiting for merge. https://github.com/PokemonGoF/PokemonGo-Bot/pull/5573 Thank you @DeXtroTip for the buddy system!
PR merged
@Anakin5 TL; DR: No buddy assigned + No buddy settings in config file -> Error No buddy assigned + Buddy settings in config file -> Buddy assigned, no error Buddy assigned + No buddy settings in config file -> No error
Is it supposed to work without any buddy assigned? Because when I removed all the buddy things from the config it threw an error
[2016-09-21 08:36:46] [PokemonGoBot] [INFO] Starting bot...
[2016-09-21 08:36:48] [CollectLevelUpReward] [INFO] Received level up reward:
[2016-09-21 08:36:48] [IncubateEggs] [INFO] Eggs incubating: [1.71/5.0 km] (Eggs left: [(2.0, 8)], Incubating: 1)
[2016-09-21 08:36:52] [UpdateLiveStats] ....
[2016-09-21 08:36:54] [ cli] [INFO]
[2016-09-21 08:36:54] [ cli] [INFO] Ran for 0:00:19
[2016-09-21 08:36:54] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h
[2016-09-21 08:36:54] [ cli] [INFO] Travelled 0.00km
[2016-09-21 08:36:54] [ cli] [INFO] Visited 0 stops
[2016-09-21 08:36:54] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
[2016-09-21 08:36:54] [ cli] [INFO] Threw 0 pokeballs
[2016-09-21 08:36:54] [ cli] [INFO] Earned 0 Stardust
[2016-09-21 08:36:54] [ cli] [INFO] Hatched eggs 0
[2016-09-21 08:36:54] [ cli] [INFO] Next egg hatches in 3.29 km
[2016-09-21 08:36:54] [ cli] [INFO]
[2016-09-21 08:36:54] [ cli] [INFO] Highest CP Pokemon:
[2016-09-21 08:36:54] [ cli] [INFO] Most Perfect Pokemon:
Traceback (most recent call last):
File "pokecli.py", line 843, in <module>
main()
File "pokecli.py", line 202, in main
bot.tick()
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/pokemongo_bot/__init__.py", line 744, in tick
if worker.work() == WorkerResult.RUNNING:
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_optimizer.py", line 136, in work
keep, try_evolve, try_upgrade, buddy = self.get_best_pokemon_for_rule(pokemon_list, rule)
ValueError: need more than 3 values to unpack
[2016-09-21 08:36:54] [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 "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/root/mydata/pokemon-go-bots/python-bots/PokemonGo-Bot/env/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)
[2016-09-21 08:36:54] [sentry.errors.uncaught] [ERROR] [u'ValueError: need more than 3 values to unpack', u' File "pokecli.py", line 843, in <module>', u' File "pokecli.py", line 202, in main', u' File "pokemongo_bot/__init__.py", line 744, in tick', u' File "pokemongo_bot/cell_workers/pokemon_optimizer.py", line 136, in work']
This is when I still had no buddy assigned. Then I tried default config which assigned my Dragonite as my buddy, and no error now, even when I removed buddy settings from the config.
Should be fine now #5588
Thanks :smile:
facing this in newer update
Traceback (most recent call last): File "pokecli.py", line 843, in
main() File "pokecli.py", line 202, in main bot.tick() File "/home/navdeep/PokemonGo-Bot/pokemongo_bot/init.py", line 770, in tick if worker.work() == WorkerResult.RUNNING: File "/home/navdeep/PokemonGo-Bot/pokemongo_bot/cell_workers/buddy_pokemon.py", line 108, in work pokemon = self._get_pokemon_by_name(self._get_pokemon_by_id(self.buddy['id']).name) KeyError: 'id' [2016-11-08 19:05:16] [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/navdeep/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/navdeep/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/home/navdeep/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/home/navdeep/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/home/navdeep/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/home/navdeep/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/home/navdeep/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/navdeep/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 1048, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1088, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 1044, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 886, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) [2016-11-08 19:05:16] [sentry.errors.uncaught] [ERROR] [u"KeyError: 'id'", u' File "pokecli.py", line 843, in ', u' File "pokecli.py", line 202, in main', u' File "pokemongo_bot/init.py", line 770, in tick', u' File "pokemongo_bot/cell_workers/buddy_pokemon.py", line 108, in work'] Tue Nov 8 19:05:16 IST 2016 Pokebot Stopped.