PokemonGo-Bot
PokemonGo-Bot copied to clipboard
TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)
Expected Behavior
Bot doesn't crash
Actual Behavior
Bot crashes
Traceback (most recent call last):
File "pokecli.py", line 502, in <module>
main()
File "pokecli.py", line 89, in main
bot.tick()
File "/usr/src/app/pokemongo_bot/__init__.py", line 434, 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'>)
Steps to Reproduce
It looks like an empty API response causes it
Other Information
OS: Docker Git Commit: ff380cd0e07f225ad1ae2c739bea9f9f80e2f8ce Python Version: whatever is in our docker container
still happens with latest bot. Currently seems, after every 1 hour.
I also have this from time to time.