I have been having this error when trying to make web requests to various hosts. After debugging a bit I have found the solution is updating the requests[security] through pip.
Run 
sudo python3 -m pip install "requests[security]"
or
sudo python -m pip install "requests[security]"
to fix this issue.
Python Error 104, connection reset by peer