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

AttributeError: module 'urllib3.util' has no attribute 'HAS_SNI' #9

Open
petropavel13 opened this issue Feb 26, 2024 · 1 comment
Open

Comments

@petropavel13
Copy link

Python 3.10, MacOS 13.6.3 (Ventura), Intel

import sys

if sys.platform.lower() == 'darwin':
    import macsesh
    macsesh.inject_into_requests()
Traceback (most recent call last):
  File "/Users/username/Projects/ProjectName/export.py", line 16, in <module>
    import macsesh
  File "/Users/username/Projects/ProjectName/.env/lib/python3.10/site-packages/macsesh/__init__.py", line 37, in <module>
    from .session import KeychainSession, Session, SimpleKeychainSession
  File "/Users/username/Projects/ProjectName/.env/lib/python3.10/site-packages/macsesh/session.py", line 8, in <module>
    from .simple_adapter import SimpleKeychainAdapter
  File "/Users/username/Projects/ProjectName/.env/lib/python3.10/site-packages/macsesh/simple_adapter.py", line 8, in <module>
    from .util import extract_from_urllib3
  File "/Users/username/Projects/ProjectName/.env/lib/python3.10/site-packages/macsesh/util.py", line 10, in <module>
    ORIGINAL_HAS_SNI = urllib3_util.HAS_SNI
AttributeError: module 'urllib3.util' has no attribute 'HAS_SNI'

Can anyone give me any suggestion how to fix that issue?

@Feuermurmel
Copy link

HAS_SNI has been removed from urllib3 2.0.0. Use urllib3<2.0 to install urllib3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants