Back to DrivenData | Blog

SSLEOFError when loading resnet34 model

Hi, I have an issue when loading my model. The error information is as follow:

++ find data/test_features -type f -iname '*.tif'
++ head -1
+ '[' -z data/test_features/aaaa/B02.tif ']'
+ '[' -f ']'
+ echo 'Running code submission with Python'
Running code submission with Python
+ conda run --no-capture-output -n condaenv python
/srv/conda/envs/condaenv/lib/python3.9/site-packages/pretrainedmodels/models/ SyntaxWarning: "is" with a literal. Did you mean "=="?
if block_type is 'proj':
/srv/conda/envs/condaenv/lib/python3.9/site-packages/pretrainedmodels/models/ SyntaxWarning: "is" with a literal. Did you mean "=="?
elif block_type is 'down':
/srv/conda/envs/condaenv/lib/python3.9/site-packages/pretrainedmodels/models/ SyntaxWarning: "is" with a literal. Did you mean "=="?
assert block_type is 'normal'
2022-01-12 17:36:39.092 | INFO     | __main__:main:131 - Loading model: /codeexecution/assets/
Downloading: "" to /codeexecution/assets/torch/hub/checkpoints/resnet34-333f7ec4.pth
Traceback (most recent call last):
File "/srv/conda/envs/condaenv/lib/python3.9/urllib/", line 1346, in do_open
h.request(req.get_method(), req.selector,, headers,
File "/srv/conda/envs/condaenv/lib/python3.9/http/", line 1279, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/srv/conda/envs/condaenv/lib/python3.9/http/", line 1325, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/srv/conda/envs/condaenv/lib/python3.9/http/", line 1274, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/srv/conda/envs/condaenv/lib/python3.9/http/", line 1034, in _send_output
File "/srv/conda/envs/condaenv/lib/python3.9/http/", line 974, in send
File "/srv/conda/envs/condaenv/lib/python3.9/http/", line 1448, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/srv/conda/envs/condaenv/lib/python3.9/", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/srv/conda/envs/condaenv/lib/python3.9/", line 1040, in _create
File "/srv/conda/envs/condaenv/lib/python3.9/", line 1309, in do_handshake
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)

Is this because of the network issue in the submission environment?


That’s correct, see if the Runtime network access section of the README can help.

Thank you, that solved this issue.