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

ConnectionError: HTTPSConnectionPool #36

Closed
shuoshuoxu opened this issue Apr 4, 2022 · 12 comments
Closed

ConnectionError: HTTPSConnectionPool #36

shuoshuoxu opened this issue Apr 4, 2022 · 12 comments
Labels
documentation Improvements or additions to documentation rembg rembg

Comments

@shuoshuoxu
Copy link

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='drive.google.com', port=443): Max retries exceeded with url: /uc?id=1tCU5MM1LhRgGou5OpmpjBQbSrYIUoYab (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbc4ad7deb0>: Failed to establish a new connection: [Errno 110] Connection timed out'))

@YuliangXiu
Copy link
Owner

Could you explain it in more detail? I can't figure out what is happening only from the error log.

@shuoshuoxu
Copy link
Author

(icon) xs@b209f4798a74:~/ICON-master/apps$ python infer.py -cfg ../configs/pifu.yaml -gpu 0 -in_dir ../examples -out_dir ../results
OMP: Info #273: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
normal environment...
PIFU:
w/ Global Image Encoder: True
Image Features used by MLP: ['image', 'normal_F', 'normal_B']
Dim of Image Features (global): 12
Dim of Geometry Features (PIFu): 1 (z-value)
Dim of MLP's first layer: 13

Resume MLP weights from ../data/ckpt/pifu.ckpt
Resume normal model from ../data/ckpt/normal.ckpt
Using cache found in /home/xs/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub
Using cache found in /home/xs/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/ch.py:1203: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
want_out = 'out' in inspect.getargspec(func).args
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.complex is a deprecated alias for the builtin complex. To silence this warning, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.unciode is a deprecated alias for np.compat.unciode. To silence this warning, use np.compat.unciode by itself. In the likely event your code does not need to work on Python 2 you can use the builtin str for which np.compat.unciode is itself an alias. Doing this will not modify any behaviour and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.str is a deprecated alias for the builtin str. To silence this warning, use str by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.complex is a deprecated alias for the builtin complex. To silence this warning, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.unciode is a deprecated alias for np.compat.unciode. To silence this warning, use np.compat.unciode by itself. In the likely event your code does not need to work on Python 2 you can use the builtin str for which np.compat.unciode is itself an alias. Doing this will not modify any behaviour and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/chumpy/init.py:11: DeprecationWarning: np.str is a deprecated alias for the builtin str. To silence this warning, use str by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
Using pymaf as HPS Estimator

Dataset Size: 9
0%| | 0/9 [02:14<?, ?it/s]
Traceback (most recent call last):
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
conn.connect()
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f5d04b26b50>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='drive.google.com', port=443): Max retries exceeded with url: /uc?id=1tCU5MM1LhRgGou5OpmpjBQbSrYIUoYab (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5d04b26b50>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "infer.py", line 101, in
for data in pbar:
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
File "/home/xs/ICON-master/apps/../lib/dataset/TestDataset.py", line 181, in getitem
img_icon, img_hps, img_ori, img_mask, uncrop_param = process_image(img_path, self.det, self.hps_type, 512)
File "/home/xs/ICON-master/apps/../lib/pymaf/utils/imutils.py", line 118, in process_image
io.BytesIO(remove(buf.getvalue()))).convert("RGBA")
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/rembg/bg.py", line 91, in remove
session = ort_session("u2net")
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/rembg/detect.py", line 33, in ort_session
gdown.download(url, str(path), use_cookies=False)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/gdown/download.py", line 146, in download
res = sess.get(url, headers=headers, stream=True, verify=verify)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/home/xs/anaconda3/envs/icon/lib/python3.8/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='drive.google.com', port=443): Max retries exceeded with url: /uc?id=1tCU5MM1LhRgGou5OpmpjBQbSrYIUoYab (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5d04b26b50>: Failed to establish a new connection: [Errno 110] Connection timed out'))

@louyanyang
Copy link

@YuliangXiu @shuoshuoxu, same error. any one solve the problem?

@YuliangXiu
Copy link
Owner

I think it is related to rembg, try VPN and upgrade the gdown.

@jeffffffli
Copy link
Contributor

I found the model got stuck in this line.

@jeffffffli
Copy link
Contributor

I found the model got stuck in this line.

To be more specifically, it stuck in the code remove(buf.getvalue()).

@YuliangXiu
Copy link
Owner

呵呵,我(娄艳阳)已收到您的信,祝你事事顺心,快乐相随

娄同学,我建议你关闭自动回复……

@Yuhuoo
Copy link

Yuhuoo commented May 27, 2022

I think it is related to rembg, try VPN and upgrade the gdown.

Is there another way to avoid using the VPN? I'm using the linux server.

@Yuhuoo
Copy link

Yuhuoo commented May 31, 2022

I think it is related to rembg, try VPN and upgrade the gdown.

Is there another way to avoid using the VPN? I'm using the linux server.

The error occurs because of the rembg cannot download the u2net.pth from the google driver.
The solutions steps as follows,
1、Installing the rembg==1.0.27
2、Downloading the u2net.pth from https://docs.google.com/uc?export=download&id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ and puting the pretrained model into ~/.u2net/u2net

@YuliangXiu YuliangXiu added the documentation Improvements or additions to documentation label Jun 3, 2022
@caiyongqi
Copy link

I think it is related to rembg, try VPN and upgrade the gdown.

Is there another way to avoid using the VPN? I'm using the linux server.

The error occurs because of the rembg cannot download the u2net.pth from the google driver. The solutions steps as follows, 1、Installing the rembg==1.0.27 2、Downloading the u2net.pth from https://docs.google.com/uc?export=download&id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ and puting the pretrained model into ~/.u2net/u2net

Nice! But it should be '~/.u2net/'.

Repository owner deleted a comment from louyanyang Jul 13, 2022
Repository owner deleted a comment from louyanyang Jul 13, 2022
Repository owner deleted a comment from louyanyang Jul 13, 2022
@YuliangXiu YuliangXiu added the rembg rembg label Jul 14, 2022
@louyanyang
Copy link

louyanyang commented Oct 11, 2022 via email

1 similar comment
@louyanyang
Copy link

louyanyang commented Nov 27, 2022 via email

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

No branches or pull requests

6 participants