Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

requests.exceptions.ConnectionError #154

Open
Wenenen opened this issue Jun 30, 2020 · 5 comments
Open

requests.exceptions.ConnectionError #154

Wenenen opened this issue Jun 30, 2020 · 5 comments

Comments

@Wenenen
Copy link

Wenenen commented Jun 30, 2020

When I ran ./train_fcn32s.py -g 0,I got this error
Traceback (most recent call last):
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/http/client.py", line 1262, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/http/client.py", line 1308, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/http/client.py", line 1257, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/connection.py", line 187, in connect
conn = self._new_conn()
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f1ef9d08588>: Failed to establish a new connection: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 725, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='drive.google.com', port=80): Max retries exceeded with url: /uc?id=0B9P1L--7Wd2vLTJZMXpIRkVVRFk (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1ef9d08588>: Failed to establish a new connection: [Errno 101] Network is unreachable',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./train_fcn32s.py", line 151, in
main()
File "./train_fcn32s.py", line 116, in main
vgg16 = torchfcn.models.VGG16(pretrained=True)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/torchfcn/models/vgg.py", line 13, in VGG16
model_file = _get_vgg16_pretrained_model()
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/torchfcn/models/vgg.py", line 23, in _get_vgg16_pretrained_model
md5='aa75b158f4181e7f6230029eb96c1b13',
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/fcn/data.py", line 32, in cached_download
gdown.download(url, path, quiet=quiet)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/gdown/download.py", line 110, in download
res = sess.get(url, stream=True)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/jbwen/anaconda3/envs/py36/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='drive.google.com', port=80): Max retries exceeded with url: /uc?id=0B9P1L--7Wd2vLTJZMXpIRkVVRFk (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1ef9d08588>: Failed to establish a new connection: [Errno 101] Network is unreachable',))

@2679622694
Copy link

I have the same question!

@songzijiang
Copy link

me too

@shi-10
Copy link

shi-10 commented Nov 26, 2020

have you solved it?

@songzijiang
Copy link

songzijiang commented Nov 27, 2020

have you solved it?

i solved it by using models locally.Some place cannot connect the google server such as China.and Then i overwrite the function which calls the service from drive.google.

@shi-10
Copy link

shi-10 commented Nov 28, 2020

have you solved it?

i solved it by using models locally.Some place cannot connect the google server such as China.and Then i overwrite the function which calls the service from drive.google.

ok~,thank you

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

No branches or pull requests

4 participants