Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running #2

Closed
typicalTYLER opened this issue May 13, 2019 · 1 comment
Closed

Error while running #2

typicalTYLER opened this issue May 13, 2019 · 1 comment

Comments

@typicalTYLER
Copy link
Collaborator

2019-05-12 13:50:00.100187: [1557669000.100187, 466.1476416887016, 89.09484575589194]
2019-05-12 13:55:00.100149: [1557669300.1001487, 468.6622642135258, 89.58279508611955]
2019-05-12 14:00:00.100192: [1557669600.1001923, 468.6622642135258, 89.58279508611955]
2019-05-12 14:05:00.100130: [1557669900.10013, 470.2249051663726, 89.87392866145701]
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 594, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 391, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1198, in getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.5/socket.py", line 576, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.5/ssl.py", line 937, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.5/ssl.py", line 799, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.5/ssl.py", line 583, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "data_collector.py", line 63, in
country_code=args.country_code), headers={'auth-token': os.environ['CO2SIGNAL_API_KEY']})
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

@typicalTYLER
Copy link
Collaborator Author

Found similar thing here: openaps/oref0#1095

Will try reinstalling requests with this longer default timeout:
pip3 --default-timeout=1000 install requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant