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

SSL error doesn't give details of the actual URL that is faiing #3184

Closed
pfmoore opened this issue Oct 14, 2015 · 1 comment
Closed

SSL error doesn't give details of the actual URL that is faiing #3184

pfmoore opened this issue Oct 14, 2015 · 1 comment
Labels
auto-locked Outdated issues that have been locked by automation type: enhancement Improvements to functionality

Comments

@pfmoore
Copy link
Member

pfmoore commented Oct 14, 2015

I'm getting SSL errors when trying to install colorama. Unfortunately, the error reported by pip doesn't give me any clues as to what URL is causing the issue:

>pip wheel colorama
Collecting colorama
Exception:
Traceback (most recent call last):
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 544, in urlopen
    body=body, headers=headers)
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 341, in _make_request
    self._validate_conn(conn)
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 761, in _validate_conn
    conn.connect()
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connection.py", line 238, in connect
    ssl_version=resolved_ssl_version)
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py", line 279, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Apps\Python34\lib\ssl.py", line 365, in wrap_socket
    _context=self)
  File "C:\Apps\Python34\lib\ssl.py", line 583, in __init__
    self.do_handshake()
  File "C:\Apps\Python34\lib\ssl.py", line 810, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\adapters.py", line 370, in send
    timeout=timeout
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 574, in urlopen
    raise SSLError(e)
pip._vendor.requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Apps\Python34\lib\site-packages\pip\basecommand.py", line 211, in main
    status = self.run(options, args)
  File "C:\Apps\Python34\lib\site-packages\pip\commands\wheel.py", line 194, in run
    if not wb.build():
  File "C:\Apps\Python34\lib\site-packages\pip\wheel.py", line 705, in build
    self.requirement_set.prepare_files(self.finder)
  File "C:\Apps\Python34\lib\site-packages\pip\req\req_set.py", line 334, in prepare_files
    functools.partial(self._prepare_file, finder))
  File "C:\Apps\Python34\lib\site-packages\pip\req\req_set.py", line 321, in _walk_req_to_install
    more_reqs = handler(req_to_install)
  File "C:\Apps\Python34\lib\site-packages\pip\req\req_set.py", line 491, in _prepare_file
    session=self.session)
  File "C:\Apps\Python34\lib\site-packages\pip\download.py", line 825, in unpack_url
    session,
  File "C:\Apps\Python34\lib\site-packages\pip\download.py", line 673, in unpack_http_url
    from_path, content_type = _download_http_url(link, session, temp_dir)
  File "C:\Apps\Python34\lib\site-packages\pip\download.py", line 857, in _download_http_url
    stream=True,
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 477, in get
    return self.request('GET', url, **kwargs)
  File "C:\Apps\Python34\lib\site-packages\pip\download.py", line 373, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 594, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 594, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 196, in resolve_redirects
    **adapter_kwargs
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "C:\Apps\Python34\lib\site-packages\pip\_vendor\requests\adapters.py", line 431, in send
    raise SSLError(e, request=request)
pip._vendor.requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

The issue was actually a custom index URL I'd forgotten I had set up, and digging in the -v output gave me the clue I needed. But pip should report failed URL access in a more user friendly manner.

@xavfernandez xavfernandez added the type: enhancement Improvements to functionality label Oct 14, 2015
@dstufft
Copy link
Member

dstufft commented Mar 24, 2017

Closing this, it appears to be fixed:

root@e6d73c257579:/# pip install --no-index --find-links=https://financialcryptography.com requests
Collecting requests
  Could not fetch URL https://financialcryptography.com: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping
  Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests

@dstufft dstufft closed this as completed Mar 24, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

3 participants