tls_client_handshake_pure_python icon indicating copy to clipboard operation
tls_client_handshake_pure_python copied to clipboard

AttributeError: module 'collections' has no attribute 'Iterable'

Open kidharb opened this issue 1 year ago • 0 comments

After running the installation instructions

python -m venv .
source bin/activate
pip install pipenv
pipenv install

python index.py www.google.com

The following error is experienced

(tls_client_handshake_pure_python) ➜  tls_client_handshake_pure_python git:(master) ✗ python index.py www.google.com
Traceback (most recent call last):
  File "/home/kidharb/src/tls_client_handshake_pure_python/index.py", line 81, in <module>
    run(host, parsed_args.cipher)
  File "/home/kidharb/src/tls_client_handshake_pure_python/index.py", line 67, in run
    client = Client(host, port, tls_version, cipher_suites, extensions=exts, match_hostname=True,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kidharb/src/tls_client_handshake_pure_python/client.py", line 47, in __init__
    ciphers = ciphers if isinstance(ciphers, collections.Iterable) else tuple(ciphers)
                                             ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Iterable'

My environment is

Python 3.11.6 (main, Nov 14 2023, 09:36:21) [GCC 13.2.1 20230801] on linux

kidharb avatar Feb 09 '24 21:02 kidharb