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

Error for downloading google doc #14

Open
Humengge opened this issue Feb 11, 2022 · 3 comments
Open

Error for downloading google doc #14

Humengge opened this issue Feb 11, 2022 · 3 comments

Comments

@Humengge
Copy link

Hello @lhoyer

I got some errors when I try to use my own images.

(threeWays) D:\Work\improving_segmentation_with_selfsupervised_depth-master>python inference.py --machine ws --model model --data t
Start inference2022-02-11_11-01-23-734969
LOG_DIR
RUNDIR: results/\inference2022-02-11_11-01-23-734969/
C:\Anaconda\envs\threeWays\lib\site-packages\torchvision\transforms\transforms.py:287: UserWarning: Argument interpolation should be of type
InterpolationMode instead of int. Please, use InterpolationMode enum.
warnings.warn(
Found 24 val images
Load mono_cityscapes_1024x512_r101dil_aspp_dec6_lr5_fd2_crop512x512bs4weights
-> Downloading pretrained model to model/mono_cityscapes_1024x512_r101dil_aspp_dec6_lr5_fd2_crop512x512bs4.zip
Downloading 1woRzEPVuhaafrS_2_GlsJuVRyxWaGO4O into model/mono_cityscapes_1024x512_r101dil_aspp_dec6_lr5_fd2_crop512x512bs4.zip... Traceback (most recent call last):
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen
self._prepare_proxy(conn)
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\connectionpool.py", line 994, in _prepare_proxy
conn.connect()
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\connection.py", line 364, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\connection.py", line 501, in connect_tls_proxy
socket = ssl_wrap_socket(
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\util\ssl
.py", line 453, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\util\ssl
.py", line 495, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "C:\Anaconda\envs\threeWays\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Anaconda\envs\threeWays\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Anaconda\envs\threeWays\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda\envs\threeWays\lib\site-packages\requests\adapters.py", line 440, in send
resp = conn.urlopen(
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "C:\Anaconda\envs\threeWays\lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='docs.google.com', port=443): Max retries exceeded with url: /uc?export=download&id=1woRzEPVuhaafrS_2_GlsJuVRyxWaGO4O (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\inference.py", line 173, in
inference_main(cfg)
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\inference.py", line 137, in inference_main
inference = Inference(cfg, logdir, os.path.join(name, str(run_id)))
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\inference.py", line 69, in init
self.model = get_model(cfg["model"], self.n_classes).to(self.device)
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\models_init_.py", line 12, in get_model
model = model(name=name, num_classes=n_classes, **param_dict)
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\models\joint_segmentation_depth.py", line 130, in joint_segmentation_depth
models["encoder"] = get_resnet_backbone(
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\models\utils.py", line 38, in get_resnet_backbone
download_model_if_doesnt_exist(backbone_pretraining)
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\models\utils.py", line 162, in download_model_if_doesnt_exist
GoogleDriveDownloader.download_file_from_google_drive(model_url, model_path + ".zip")
File "D:\Work\improving_segmentation_with_selfsupervised_depth-master\utils\google_drive_downloader.py", line 59, in download_file_from_google_drive
response = session.get(GoogleDriveDownloader.DOWNLOAD_URL, params={'id': file_id}, stream=True)
File "C:\Anaconda\envs\threeWays\lib\site-packages\requests\sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "C:\Anaconda\envs\threeWays\lib\site-packages\requests\sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "C:\Anaconda\envs\threeWays\lib\site-packages\requests\sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "C:\Anaconda\envs\threeWays\lib\site-packages\requests\adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='docs.google.com', port=443): Max retries exceeded with url: /uc?export=download&id=1woRzEPVuhaafrS_2_GlsJuVRyxWaGO4O (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

It seems like it cannot download the google document, and I try to open the url on chrome and it shows the error 400.

Thanks !

@lhoyer
Copy link
Owner

lhoyer commented Feb 11, 2022

I'm not sure why the automatic download does not work.
Here is the Google Drive link for a manual download: https://drive.google.com/file/d/1woRzEPVuhaafrS_2_GlsJuVRyxWaGO4O/view?usp=sharing
Are you able to download it from that link?

@Humengge
Copy link
Author

Yep, I can download this file by the web, not able by codes. Where should I put this file?

@lhoyer
Copy link
Owner

lhoyer commented Feb 13, 2022

You can find the relevant procedure for extracting the downloaded zip to the right paths here:

def download_model_if_doesnt_exist(model_name, download_dir=None):

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

No branches or pull requests

2 participants