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.

module 'lib' has no attribute 'SSL_OP_NO_TLSv1_3'

See original GitHub issue

Issue description

Every pipenv commands ends with error

Actual result

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.7/pipenv", line 33, in <module>
    sys.exit(load_entry_point('pipenv==2020.11.4', 'console_scripts', 'pipenv')())
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 781, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 700, in make_context
    self.parse_args(ctx, args)
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1212, in parse_args
    rest = Command.parse_args(self, ctx, args)
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1044, in parse_args
    parser = self.make_parser(ctx)
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 965, in make_parser
    for param in self.get_params(ctx):
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 912, in get_params
    help_option = self.get_help_option(ctx)
  File "/usr/lib/python3.7/site-packages/pipenv/cli/options.py", line 27, in get_help_option
    from ..core import format_help
  File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 33, in <module>
    from .project import Project
  File "/usr/lib/python3.7/site-packages/pipenv/project.py", line 30, in <module>
    from .vendor.requirementslib.models.utils import get_default_pyproject_backend
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/requirementslib/__init__.py", line 9, in <module>
    from .models.lockfile import Lockfile
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/lockfile.py", line 14, in <module>
    from ..utils import is_editable, is_vcs, merge_items
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/requirementslib/utils.py", line 8, in <module>
    import pip_shims.shims
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/__init__.py", line 26, in <module>
    from . import shims
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/shims.py", line 12, in <module>
    from .models import (
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/models.py", line 790, in <module>
    Command.add_mixin(SessionCommandMixin)
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/models.py", line 704, in add_mixin
    mixin = mixin.shim()
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/models.py", line 752, in shim
    result = self.traverse(top_path)
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/models.py", line 744, in traverse
    result = shim.shim()
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/models.py", line 590, in shim
    imported = self._import()
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/models.py", line 615, in _import
    result = self._import_module(self.calculated_module_path)
  File "/usr/lib/python3.7/site-packages/pipenv/vendor/pip_shims/models.py", line 365, in _import_module
    imported = importlib.import_module(module)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/cli/req_command.py", line 15, in <module>
    from pipenv.patched.notpip._internal.index.package_finder import PackageFinder
  File "/usr/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/index/package_finder.py", line 21, in <module>
    from pipenv.patched.notpip._internal.index.collector import parse_links
  File "/usr/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/index/collector.py", line 12, in <module>
    from pipenv.patched.notpip._vendor import html5lib, requests
  File "/usr/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/requests/__init__.py", line 97, in <module>
    from pipenv.patched.notpip._vendor.urllib3.contrib import pyopenssl
  File "/usr/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3.7/site-packages/OpenSSL/SSL.py", line 149, in <module>
    OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3
AttributeError: module 'lib' has no attribute 'SSL_OP_NO_TLSv1_3'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
thedustyrovercommented, Nov 30, 2020

pyOpenSSL was updated to 20.0.0 on Nov 27 and seems to have this incompatibility. Pinning to 19.1.0 should work.

1reaction
midactscommented, Dec 3, 2020

pyopenssl==19.1.0 worked for me. Thanks fr the fix 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'lib' has no attribute ... - Stack Overflow
I tried pip uninstalling and pip upgrading the google-api-python-client but I cant seem to find any information on this particular error. For ...
Read more >
What may be the cause of this error? AttributeError: module 'lib ...
This happens due to cryptography library version mismatch. ... AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'.
Read more >
AttributeError: module 'lib' has no attribute 'X509_up_ref'
I was trying to run sudo /usr/bin/certbot renew and it was failing with the X509_up_ref error. This resolved my issue.
Read more >
openssl - module 'lib' has no attribute ... - Ask Ubuntu
I ran into this with pyOpenSSL==19.0.0 and was able to fix this with pip3 install pyOpenSSL --upgrade.
Read more >
ERPNext Forum
frappe.integrations.doctype.s3_backup_settings.s3_backup_settings.take_backups_daily is not a valid method: module 'lib' has no attribute ...
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