pytorch-fcn icon indicating copy to clipboard operation
pytorch-fcn copied to clipboard

requests.exceptions.ConnectionError

Open Wenenen opened this issue 4 years ago • 5 comments

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',))

Wenenen avatar Jun 30 '20 11:06 Wenenen

I have the same question!

2679622694 avatar Sep 26 '20 02:09 2679622694

me too

songzijiang avatar Nov 21 '20 06:11 songzijiang

have you solved it?

shi-10 avatar Nov 26 '20 12:11 shi-10

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.

songzijiang avatar Nov 27 '20 01:11 songzijiang

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

shi-10 avatar Nov 28 '20 01:11 shi-10