# Problems encountered when using Total Segmentor for the first time - zenodo.org ... Failed to establish a new connection

**URL:** <https://discourse.slicer.org/t/problems-encountered-when-using-total-segmentor-for-the-first-time-zenodo-org-failed-to-establish-a-new-connection/31169>\
**Category:** Support\
**Created:** [August 16, 2023, 10:09am UTC](https://discourse.slicer.org/t/problems-encountered-when-using-total-segmentor-for-the-first-time-zenodo-org-failed-to-establish-a-new-connection/31169 "2023-08-16T10:09:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shziyang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shziyang/32/67185_2.png) [@shziyang](https://discourse.slicer.org/u/shziyang)\
**Post date:** [August 16, 2023, 10:09am UTC](https://discourse.slicer.org/t/problems-encountered-when-using-total-segmentor-for-the-first-time-zenodo-org-failed-to-establish-a-new-connection/31169/1 "2023-08-16T10:09:59Z")

</div>

Processing started  
Writing input file to C:/Users/23398/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-08-16\_15+49+58.272/total-segmentator-input.nii  
Creating segmentations with TotalSegmentator AI…  
Total Segmentator arguments: [‘-i’, ‘C:/Users/23398/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-08-16\_15+49+58.272/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/23398/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-08-16\_15+49+58.272/segmentation’, ‘–ml’, ‘–task’, ‘total’, ‘–fast’]

If you use this tool please cite: [[2208.05868] TotalSegmentator: robust segmentation of 104 anatomical structures in CT images](https://doi.org/10.48550/arXiv.2208.05868)

Using ‘fast’ option: resampling to lower resolution (3mm)  
Downloading pretrained weights for Task 256 (~230MB) …  
Traceback (most recent call last):  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\connection.py”, line 174, in \_new\_conn  
conn = connection.create\_connection(  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\util\connection.py”, line 72, in create\_connection  
for res in socket.getaddrinfo(host, port, family, socket.SOCK\_STREAM):  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\socket.py”, line 954, in getaddrinfo  
for res in \_socket.getaddrinfo(host, port, family, type, proto, flags):  
socket.gaierror: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 703, in urlopen  
httplib\_response = self.\_make\_request(  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 386, in \_make\_request  
self.\_validate\_conn(conn)  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 1042, in \_validate\_conn  
conn.connect()  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\connection.py”, line 358, in connect  
self.sock = conn = self.\_new\_conn()  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\connection.py”, line 186, in \_new\_conn  
raise NewConnectionError(  
urllib3.exceptions.NewConnectionError: \<urllib3.connection.HTTPSConnection object at 0x0000024D31FC65E0\>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\requests\adapters.py”, line 489, in send  
resp = conn.urlopen(  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 787, in urlopen  
retries = retries.increment(  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\urllib3\util\retry.py”, line 592, in increment  
raise MaxRetryError(\_pool, url, error or ResponseError(cause))  
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘[zenodo.org](http://zenodo.org)’, port=443): Max retries exceeded with url: /record/6802052/files/Task256\_TotalSegmentator\_3mm\_1139subj.zip?download=1 (Caused by NewConnectionError(‘\<urllib3.connection.HTTPSConnection object at 0x0000024D31FC65E0\>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Scripts\TotalSegmentator”, line 93, in   
main()  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Scripts\TotalSegmentator”, line 86, in main  
totalsegmentator(args.input, args.output, args.ml, args.nr\_thr\_resamp, args.nr\_thr\_saving,  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\totalsegmentator\python\_api.py”, line 157, in totalsegmentator  
download\_pretrained\_weights(task\_id)  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 183, in download\_pretrained\_weights  
download\_url\_and\_unpack(WEIGHTS\_URL, config\_dir)  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 69, in download\_url\_and\_unpack  
raise e  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 55, in download\_url\_and\_unpack  
with requests.get(url, stream=True) as r:  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\requests\api.py”, line 73, in get  
return request(“get”, url, params=params, \*\*kwargs)  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\requests\api.py”, line 59, in request  
return session.request(method=method, url=url, \*\*kwargs)  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\requests\sessions.py”, line 587, in request  
resp = self.send(prep, \*\*send\_kwargs)  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\requests\sessions.py”, line 701, in send  
r = adapter.send(request, \*\*kwargs)  
File “E:\3D slicer\Slicer 5.2.2\lib\Python\Lib\site-packages\requests\adapters.py”, line 565, in send  
raise ConnectionError(e, request=request)  
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘[zenodo.org](http://zenodo.org)’, port=443): Max retries exceeded with url: /record/6802052/files/Task256\_TotalSegmentator\_3mm\_1139subj.zip?download=1 (Caused by NewConnectionError(‘\<urllib3.connection.HTTPSConnection object at 0x0000024D31FC65E0\>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 16, 2023, 10:13am UTC](https://discourse.slicer.org/t/problems-encountered-when-using-total-segmentor-for-the-first-time-zenodo-org-failed-to-establish-a-new-connection/31169/2 "2023-08-16T10:13:46Z")

</div>

> [@shziyang](#):
>
> urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘[zenodo.org](http://zenodo.org)’, port=443): Max retries exceeded with url: /record/6802052/files/Task256\_TotalSegmentator\_3mm\_1139subj.zip?download=1 (Caused by NewConnectionError(‘\<urllib3.connection.HTTPSConnection object at 0x0000024D31FC65E0\>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

It means that the server the model weights are downloaded from was overloaded. Most probably the download will succeed if you retry later (the downloaded data is cached, so once it is downloaded, you don’t need to worry about the server again) or you can try to manually download the model weights as described [here](https://github.com/lassoan/SlicerTotalSegmentator/issues/13).

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 16, 2023, 10:20am UTC](https://discourse.slicer.org/t/problems-encountered-when-using-total-segmentor-for-the-first-time-zenodo-org-failed-to-establish-a-new-connection/31169/3 "2023-08-16T10:20:50Z")

</div>

On a second look, the `Failed to establish a new connection` indicates that the server was not accessible at all. This is more likely to be caused by a too aggressive firewall or proxy server.

If you cannot access [zenodo.org](http://zenodo.org) in your web browser then you may need to connect via a VPN.

If you can access [zenodo.org](http://zenodo.org) in your web browser then you may need to adjust your proxy settings. Slicer uses these system proxy settings by default, but you can set proxy server information in environment variables `http_proxy` and `https_proxy`.
