PokemonGo-Bot
PokemonGo-Bot copied to clipboard
requests.exceptions.ChunkedEncodingError: ("Connection broken: error(104, 'Connection reset by peer')", error(104, 'Connection reset by peer'))
Expected Behavior
Script should be able to re-try connecting after connection is broken
Actual Behavior
Exception is thrown and the script stopped
Steps to Reproduce
Run python pokecli.py and after a while, the following error appeared
Traceback (most recent call last):
File "pokecli.py", line 220, in <module>
main()
File "pokecli.py", line 211, in main
bot.take_step()
File "/home/liam/Projects/PokemonGo-Bot/pokemongo_bot/__init__.py", line 36, in take_step
self.stepper.take_step()
File "/home/liam/Projects/PokemonGo-Bot/pokemongo_bot/stepper.py", line 62, in take_step
self._work_at_position(position[0], position[1], position[2], True)
File "/home/liam/Projects/PokemonGo-Bot/pokemongo_bot/stepper.py", line 139, in _work_at_position
self.bot.work_on_cell(cell, position, pokemon_only)
File "/home/liam/Projects/PokemonGo-Bot/pokemongo_bot/__init__.py", line 93, in work_on_cell
worker.work()
File "/home/liam/Projects/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_fort_worker.py", line 30, in work
self.stepper._walk_to(self.config.walk, *position)
File "/home/liam/Projects/PokemonGo-Bot/pokemongo_bot/stepper.py", line 88, in _walk_to
alt, False)
File "/home/liam/Projects/PokemonGo-Bot/pokemongo_bot/stepper.py", line 102, in _work_at_position
response_dict = self.api.call()
File "/home/liam/Projects/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 81, in call
response = request.request(api_endpoint, self._req_method_list, player_position)
File "/home/liam/Projects/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 91, in request
response = self._make_rpc(endpoint, request_proto)
File "/home/liam/Projects/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 79, in _make_rpc
http_response = self._session.post(endpoint, data=request_proto_serialized)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 518, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 617, in send
r.content
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 741, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 667, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: error(104, 'Connection reset by peer')", error(104, 'Connection reset by peer'))
Other Information
OS: Ubuntu 14.04 Git Commit: 3aca6d798f8a3e173dce0beb7b13c9505cc5b251
I also just hit this on dev.
I am also being hit by this
Please upgrade to the latest dev branch by running this command:
git reset --hard
git pull -f
Then run this command:
pip install --upgrade -r requirements.txt
If issue persists, open a new issue.
/closed