I am using `site.upload()` and received some massive tracebacks being printed to the terminal when there was a connection timeout. I believe this was caused by a large file not using chunked upload, but here I want to report the error handling in Pywikibot, rather than the error itself. This printout just increases in length as the response to the error is to wait and retry. For example, in one recent case, it retried 20 times, generating over 600 lines of traceback, before I manually killed it. I think all of the lines of error messaging from urllib3 and requests could be condensed into a single line, such as "ERROR: The read operation timed out." (or whatever the best summary is).
Example traceback:
```
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 5 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 10 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 20 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 40 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 80 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 120 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 120 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 120 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 120 seconds before retrying.
ERROR: An error occurred for uri https://commons.wikimedia.org/w/api.php
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/srv/paws/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1732, in _http_request
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1797, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 315, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 519, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 404, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 382, in _http_process
**http_request.kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Read timed out. (read timeout=45)
WARNING: Waiting 120 seconds before retrying.
```