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

Bot Crashes (when evolving Pokemon?)

Open mlussi opened this issue 10 years ago • 5 comments

Expected Behavior

Continue Running

Actual Behavior

Bot crashes

Steps to Reproduce

Start Bot and Run

Other Information

OS: Debian GNU/Linux Git Commit: 7cc524ed80a918170efcd782829ed6a94e2c4674 Python Version: Python 2.7.12

Traceback (most recent call last): File "pokecli.py", line 503, in <module> main() File "pokecli.py", line 89, in main bot.tick() File "/home/[user]/PokemonGo/PokemonGo-Bot/pokemongo_bot/__init__.py", line 434, in tick if worker.work() == WorkerResult.RUNNING: File "/home/[user]/PokemonGo/PokemonGo-Bot/pokemongo_bot/cell_workers/evolve_pokemon.py", line 28, in work response_dict = self.api.get_inventory() File "/home/[user]/PokemonGo/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 122, in function return request.call() File "/home/[user]/PokemonGo/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 106, in call result = self._call() File "/home/[user]/PokemonGo/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 63, in _call return PGoApiRequest.call(self) File "/home/[user]/PokemonGo/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 220, in call response = request.request(self._api_endpoint, self._req_method_list, self.get_position()) File "/home/[user]/PokemonGo/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 126, in request request_proto = self._build_main_request(subrequests, player_position) File "/home/[user]/PokemonGo/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 216, in _build_main_request request.auth_info.token.contents = self._auth_provider.get_access_token() File "/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/python_message.py", line 669, in field_setter new_value = type_checker.CheckValue(new_value) File "/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/type_checkers.py", line 176, in CheckValue raise TypeError(message) TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>) 2016-08-08 16:04:28,938 [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 "/usr/local/lib/python2.7/dist-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/usr/local/lib/python2.7/dist-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/usr/local/lib/python2.7/dist-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python2.7/dist-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/usr/local/lib/python2.7/dist-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/usr/local/lib/python2.7/dist-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/usr/local/lib/python2.7/dist-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/usr/local/lib/python2.7/dist-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-08-08 16:04:28,991 [sentry.errors.uncaught] [ERROR] [u"TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)", u' File "pokecli.py", line 503, in <module>', u' File "pokecli.py", line 89, in main', u' File "pokemongo_bot/__init__.py", line 434, in tick', u' File "pokemongo_bot/cell_workers/evolve_pokemon.py", line 28, in work', u' File "pgoapi/pgoapi.py", line 122, in function', u' File "pokemongo_bot/api_wrapper.py", line 106, in call', u' File "pokemongo_bot/api_wrapper.py", line 63, in _call', u' File "pgoapi/pgoapi.py", line 220, in call', u' File "pgoapi/rpc_api.py", line 126, in request', u' File "pgoapi/rpc_api.py", line 216, in _build_main_request', u' File "usr/local/lib/python2.7/dist-packages/google/protobuf/internal/python_message.py", line 669, in field_setter', u' File "usr/local/lib/python2.7/dist-packages/google/protobuf/internal/type_checkers.py", line 176, in CheckValue']

mlussi avatar Aug 08 '16 14:08 mlussi

As there have been many updates since this issue was posted, I'm assuming this issue has been resolved. If I'm wrong, please reopen.

RedViper9 avatar Aug 11 '16 08:08 RedViper9

Please reopen

Expected Behavior

Keep running

Actual Behavior

Bot crashes after the summary is printed

Steps to Reproduce

Run the bot for about 1 hour and it happens

Other Information

Run in docker built with given Dockfile dev branch commit: ee9c6f3

2016-08-13 01:53:52,722 [ cli] [INFO] 2016-08-13 01:53:52,723 [ cli] [INFO] Ran for 0:59:46 2016-08-13 01:53:52,723 [ cli] [INFO] Total XP Earned: 19265 Average: 19338.61/h 2016-08-13 01:53:52,723 [ cli] [INFO] Travelled 4.05km 2016-08-13 01:53:52,723 [ cli] [INFO] Visited 78 stops 2016-08-13 01:53:52,723 [ cli] [INFO] Encountered 45 pokemon, 44 caught, 45 released, 9 evolved, 1 never seen before 2016-08-13 01:53:52,723 [ cli] [INFO] Threw 51 pokeballs 2016-08-13 01:53:52,723 [ cli] [INFO] Earned 6000 Stardust 2016-08-13 01:53:52,723 [ cli] [INFO] 2016-08-13 01:53:52,723 [ cli] [INFO] Highest CP Pokemon: Tangela [CP: 901] [IV: 14/3/14] Potential: 0.69 2016-08-13 01:53:52,723 [ cli] [INFO] Most Perfect Pokemon: Venonat [CP: 347] [IV: 14/14/14] Potential: 0.93 Traceback (most recent call last): File "pokecli.py", line 521, in main() File "pokecli.py", line 95, in main bot.tick() File "/usr/src/app/pokemongo_bot/init.py", line 441, in tick if worker.work() == WorkerResult.RUNNING: File "/usr/src/app/pokemongo_bot/cell_workers/evolve_pokemon.py", line 28, in work response_dict = self.api.get_inventory() File "/usr/src/app/src/pgoapi/pgoapi/pgoapi.py", line 122, in function return request.call() File "/usr/src/app/pokemongo_bot/api_wrapper.py", line 106, in call result = self._call() File "/usr/src/app/pokemongo_bot/api_wrapper.py", line 63, in _call return PGoApiRequest.call(self) File "/usr/src/app/src/pgoapi/pgoapi/pgoapi.py", line 220, in call response = request.request(self._api_endpoint, self._req_method_list, self.get_position()) File "/usr/src/app/src/pgoapi/pgoapi/rpc_api.py", line 126, in request request_proto = self._build_main_request(subrequests, player_position) File "/usr/src/app/src/pgoapi/pgoapi/rpc_api.py", line 216, in _build_main_request request.auth_info.token.contents = self._auth_provider.get_access_token() File "/usr/local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 669, in field_setter new_value = type_checker.CheckValue(new_value) File "/usr/local/lib/python2.7/site-packages/google/protobuf/internal/type_checkers.py", line 176, in CheckValue raise TypeError(message) TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>) 2016-08-13 01:53:52,730 [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 "/usr/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/usr/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/usr/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/local/lib/python2.7/httplib.py", line 1057, in request self._send_request(method, url, body, headers) File "/usr/local/lib/python2.7/httplib.py", line 1097, in _send_request self.endheaders(body) File "/usr/local/lib/python2.7/httplib.py", line 1053, in endheaders self._send_output(message_body) File "/usr/local/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-08-13 01:53:52,730 [sentry.errors.uncaught] [ERROR] [u"TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)", u' File "pokecli.py", line 521, in ', u' File "pokecli.py", line 95, in main', u' File "pokemongo_bot/init.py", line 441, in tick', u' File "pokemongo_bot/cell_workers/evolve_pokemon.py", line 28, in work', u' File "pgoapi/pgoapi.py", line 122, in function', u' File "pokemongo_bot/api_wrapper.py", line 106, in call', u' File "pokemongo_bot/api_wrapper.py", line 63, in _call', u' File "pgoapi/pgoapi.py", line 220, in call', u' File "pgoapi/rpc_api.py", line 126, in request', u' File "pgoapi/rpc_api.py", line 216, in _build_main_request', u' File "/usr/local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 669, in field_setter', u' File "/usr/local/lib/python2.7/site-packages/google/protobuf/internal/type_checkers.py", line 176, in CheckValue']

IanFang avatar Aug 13 '16 03:08 IanFang

I think the current work around is to use a script that relaunches the bot if it exits with an error.

RedViper9 avatar Aug 13 '16 03:08 RedViper9

No problem when using the master branch. Only happen with the dev branch. Now trying the --restart=always option of docker run command as a work around. Not sure if it will work as expected. Will update the result.

IanFang avatar Aug 13 '16 06:08 IanFang

@IanFang your issue is different to this one, please create a separate issue for it (after updating and trying again of course)

k4n30 avatar Aug 13 '16 10:08 k4n30