question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[11.6.7] SSL Error when locking

See original GitHub issue

Be sure to check the existing issues (both open and closed!).

This looks like the same issue as #1707, which says that 11.6.3 fixes the issue. But I’m seeing it with 11.6.7.

When attempting to run pipenv lock, I’m getting an SSLError “No such file or directory”. Full stack trace below (I ran pipenv lock -v to get the full set of stack traces, but omitted the resolution output, which seemed to work fine).

I tried the workaround listed in #1707 (pip install certifi) with no luck (“Requirement already satisfied” and no change in behavior).

$ python -m pipenv.help output Pipenv version: `'11.6.7'`

Pipenv location: 'C:\\Python36\\lib\\site-packages\\pipenv'

Python location: 'C:\\Python36\\python.exe'

Other Python installations in PATH:

  • 3.6: C:\Python36\python.exe

  • 3.6.4: C:\Python36\python.exe

  • 3.6.4: C:\Users\rcoulman\AppData\Local\Programs\Python\Launcher\py.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.4',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '7',
 'platform_system': 'Windows',
 'platform_version': '6.1.7601',
 'python_full_version': '3.6.4',
 'python_version': '3.6',
 'sys_platform': 'win32'}

System environment variables:

  • ALLUSERSPROFILE
  • APPDATA
  • ASL.LOG
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • FP_NO_HOST_CHECK
  • HOMEDRIVE
  • HOMEPATH
  • LOCALAPPDATA
  • LOGONSERVER
  • NUMBER_OF_PROCESSORS
  • OS
  • PATH
  • PATHEXT
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PSMODULEPATH
  • PUBLIC
  • SESSIONNAME
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TMP
  • TVT
  • USERDNSDOMAIN
  • USERDOMAIN
  • USERNAME
  • USERPROFILE
  • WINDIR
  • WINDOWS_TRACING_FLAGS
  • WINDOWS_TRACING_LOGFILE
  • PIP_PYTHON_PATH
  • PYTHONUNBUFFERED

Pipenv-specific environment variables:

Debug-specific environment variables:

  • PATH: %SystemRoot%\system32\WindowsPowerShell\v1.0\;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\ProgramData\ Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\ ;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\QuickTime\Q TSystem\;C:\Program Files (x86)\Bitvise SSH Client;C:\Python36\Scripts\;C:\Python36\;C:\Users\rcoulman\AppData\Local\Pro grams\Python\Launcher\;C:\Users\rcoulman\AppData\Roaming\Python\Python36\Scripts;C:\Ruby25-x64\bin;C:\Users\rcoulman\App Data\Local\atom\bin;C:\Users\rcoulman\AppData\Local\Programs\Git\cmd

Contents of Pipfile (‘C:\Users\rcoulman\src\py_spike\Pipfile’):

[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"


[packages]

canopen = "~= 0.5.1"
hats = {git = "git@dev-git02:hats", editable = true}


[dev-packages]

"autopep8" = "~= 1.3"
"flake8" = "~= 3.5"
pytest = "~= 3.4"
pytest-watch = "~= 4.1"


[requires]

python_version = "3.6"


[pipenv]

keep_outdated = true


Expected result

I expected the pipenv lock command to complete successfully.

Actual result
Full Stack Trace Traceback (most recent call last): File "c:\\python36\\lib\\site-packages\\pipenv\..\pipenv\vendor\requests\packages\urllib3\util\ssl_.py", line 295, in ssl_wrap_socket context.load_verify_locations(ca_certs, ca_cert_dir) FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\adapters.py”, line 423, in send timeout=timeout File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\packages\urllib3\connectionpool.py”, line 595 , in urlopen chunked=chunked) File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\packages\urllib3\connectionpool.py”, line 352 , in _make_request self._validate_conn(conn) File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\packages\urllib3\connectionpool.py”, line 831 , in validate_conn conn.connect() File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\packages\urllib3\connection.py”, line 289, in connect ssl_version=resolved_ssl_version) File "c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\packages\urllib3\util\ssl.py", line 297, in ssl_wrap_socket raise SSLError(e) requests.packages.urllib3.exceptions.SSLError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\python36\lib\site-packages\pipenv\resolver.py”, line 66, in <module> main() File “c:\python36\lib\site-packages\pipenv\resolver.py”, line 54, in main results = resolve(packages, pre=do_pre, sources=project.sources, verbose=is_verbose, clear=do_clear) File “c:\python36\lib\site-packages\pipenv\resolver.py”, line 52, in resolve return pipenv.utils.resolve_deps(packages, which, project=project, pre=pre, sources=sources, clear=clear, verbose=ve rbose) File “c:\python36\lib\site-packages\pipenv..\pipenv\utils.py”, line 429, in resolve_deps r = requests.get(‘https://pypi.org/pypi/{0}/json’.format(name), timeout=10) File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\sessions.py”, line 488, in get return self.request(‘GET’, url, **kwargs) File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\sessions.py”, line 475, in request resp = self.send(prep, **send_kwargs) File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\sessions.py”, line 596, in send r = adapter.send(request, **kwargs) File “c:\python36\lib\site-packages\pipenv..\pipenv\vendor\requests\adapters.py”, line 497, in send raise SSLError(e, request=request) requests.exceptions.SSLError: [Errno 2] No such file or directory

Steps to replicate

Using Pipfile from above details, run pipenv.lock. There is a private git dependency in there; that one can be safely omitted from the Pipfile and the error will still occur.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:28 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
agoose77commented, Mar 14, 2018

This could be completely unrelated, but in the event that anyone else sees this; I installed miniconda after system python, but exported PATH from miniconda last, so in my case, my problems were caused by having two Python installations on the search path

1reaction
randycoulmancommented, Mar 14, 2018

@AlphaSoldier I completely uninstalled Python and all virtualenvs, etc. from my box, then reinstalled and everything seems to be working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

8 Ways to Fix SSL Connection Errors on Various Browsers ...
5. How to Fix the SSL Connection Error on Android · Open the Chrome browser and access its Settings menu. · Go to...
Read more >
How to Fix SSL Connection Errors on Android Phones
Start by opening Chrome and then pressing “Menu.” Go to “Privacy” and select “Settings.” Then choose “Clear Browsing Data.” Check all the boxes...
Read more >
Use SSL to connect to the outgoing mail server in Mail on Mac
If you receive an “Unable to connect” error message after making the change, deselect Use TLS/SSL and contact your email account provider.
Read more >
FIX: Certificate error when you try to visit an SSL Web site by ...
FIX: Certificate error when you try to visit an SSL Web site by using Internet Explorer 7: "There is a problem with this...
Read more >
My SSL Lock is Not Displaying | InMotion Hosting
It is a common reaction to blame the SSL or host for having the certificate installed improperly. This is usually not the case....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found