Hi Glenn,
I have the same issue apparently, and on a paid plan too.
Could you fix it for me too?
Thanks,
nicolas
r = requests.get('http://google.com')
OSError Traceback (most recent call last)
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py in _new_conn(self)
141 conn = connection.create_connection(
--> 142 (self.host, self.port), self.timeout, **extra_kw)
143
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
90 if err is not None:
---> 91 raise err
92
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
80 sock.bind(source_address)
---> 81 sock.connect(sa)
82 return sock
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
NewConnectionError Traceback (most recent call last)
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, **response_kw)
577 body=body, headers=headers,
--> 578 chunked=chunked)
579
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, httplib_request_kw)
361 else:
--> 362 conn.request(method, url, httplib_request_kw)
363
/usr/lib/python3.4/http/client.py in request(self, method, url, body, headers)
1124 """Send a complete request to the server."""
-> 1125 self._send_request(method, url, body, headers)
1126
/usr/lib/python3.4/http/client.py in _send_request(self, method, url, body, headers)
1162 body = body.encode('iso-8859-1')
-> 1163 self.endheaders(body)
1164
/usr/lib/python3.4/http/client.py in endheaders(self, message_body)
1120 raise CannotSendHeader()
-> 1121 self._send_output(message_body)
1122
/usr/lib/python3.4/http/client.py in _send_output(self, message_body)
950 message_body = None
--> 951 self.send(msg)
952 if message_body is not None:
/usr/lib/python3.4/http/client.py in send(self, data)
885 if self.auto_open:
--> 886 self.connect()
887 else:
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py in connect(self)
166 def connect(self):
--> 167 conn = self._new_conn()
168 self._prepare_conn(conn)
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py in _new_conn(self)
150 raise NewConnectionError(
--> 151 self, "Failed to establish a new connection: %s" % e)
152
NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x7fca22b11630>: Failed to establish a new connection: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
MaxRetryError Traceback (most recent call last)
/usr/local/lib/python3.4/dist-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
402 retries=self.max_retries,
--> 403 timeout=timeout
404 )
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, **response_kw)
622 retries = retries.increment(method, url, error=e, _pool=self,
--> 623 _stacktrace=sys.exc_info()[2])
624 retries.sleep()
/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
280 if new_retry.is_exhausted():
--> 281 raise MaxRetryError(_pool, url, error or ResponseError(cause))
282
MaxRetryError: HTTPConnectionPool(host='google.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fca22b11630>: Failed to establish a new connection: [Errno 101] Network is unreachable',))
During handling of the above exception, another exception occurred:
ConnectionError Traceback (most recent call last)
<ipython-input-11-45fd01e1f020> in <module>()
----> 1 r = requests.get('http://google.com')
/usr/local/lib/python3.4/dist-packages/requests/api.py in get(url, params, kwargs)
69
70 kwargs.setdefault('allow_redirects', True)
---> 71 return request('get', url, params=params, kwargs)
72
73
/usr/local/lib/python3.4/dist-packages/requests/api.py in request(method, url, kwargs)
55 # cases, and look like a memory leak in others.
56 with sessions.Session() as session:
---> 57 return session.request(method=method, url=url, kwargs)
58
59
/usr/local/lib/python3.4/dist-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
473 }
474 send_kwargs.update(settings)
--> 475 resp = self.send(prep, **send_kwargs)
476
477 return resp
/usr/local/lib/python3.4/dist-packages/requests/sessions.py in send(self, request, kwargs)
583
584 # Send the request
--> 585 r = adapter.send(request, kwargs)
586
587 # Total elapsed time of the request (approximately)
/usr/local/lib/python3.4/dist-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
465 raise ProxyError(e, request=request)
466
--> 467 raise ConnectionError(e, request=request)
468
469 except ClosedPoolError as e:
ConnectionError: HTTPConnectionPool(host='google.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fca22b11630>: Failed to establish a new connection: [Errno 101] Network is unreachable',))