MacSesh icon indicating copy to clipboard operation
MacSesh copied to clipboard

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

Open petropavel13 opened this issue 11 months ago • 1 comments

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?

petropavel13 avatar Feb 26 '24 12:02 petropavel13

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

Feuermurmel avatar May 16 '24 13:05 Feuermurmel