ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Error "ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)" when running python -m spacy download en_core_web_md

book

Article ID: 212410

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager

Issue/Introduction

The following error appears when running: python -m spacy download en_core_web_md 


  File "<local drive>\<Anaconda3 installation folder>\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "<local drive>\<Anaconda3 installation folder>\lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "<local drive>\<Anaconda3 installation folder>\lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "<local drive>\<Anaconda3 installation folder>\lib\site-packages\urllib3\connection.py", line 344, in connect
    ssl_context=context)
  File "<local drive>\<Anaconda3 installation folder>\lib\site-packages\urllib3\util\ssl_.py", line 347, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "<local drive>\<Anaconda3 installation folder>\lib\ssl.py", line 412, in wrap_socket
    session=session
  File "<local drive>\<Anaconda3 installation folder>\lib\ssl.py", line 853, in _create
    self.do_handshake()
  File "<local drive>\<Anaconda3 installation folder>\lib\ssl.py", line 1117, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\requests\adapters.py", line 449, in send
    timeout=timeout
  File "<local drive>\<Anaconda3 installation folder>\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "<local drive>\<Anaconda3 installation folder>\lib\site-packages\urllib3\util\retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/shortcuts-v2.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<local drive>\<Anaconda3 installation folder>\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "<local drive>\<Anaconda3 installation folder>\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\spacy\__main__.py", line 35, in <module>
    plac.call(commands[command], sys.argv[1:])
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\plac_core.py", line 328, in call
    cmd, result = parser.consume(arglist)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\spacy\cli\download.py", line 38, in download
    shortcuts = get_json(about.__shortcuts__, "available shortcuts")
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\spacy\cli\download.py", line 84, in get_json
    r = requests.get(url)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\requests\api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "<local drive>\<Aria folder>\botenv\lib\site-packages\requests\adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/shortcuts-v2.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)')))

 

Cause

Network configuration blocking connection while downloading files

Environment

Release : 17.3

Component : XFLOW INTERFACE FOR SDM / ARIA

Resolution

Add the following URL to network whitelist:

https://github.com/explosion/spacy-models/releases/download/