knownsec / ZoomEye-python

ZoomEye-python: The official Python library and CLI by Knownsec 404 Team.
https://www.zoomeye.org/doc
GNU General Public License v2.0
531 stars 123 forks source link

AttributeError: type object 'Callable' has no attribute '_abc_registry' #109

Open well-it-wasnt-me opened 10 months ago

well-it-wasnt-me commented 10 months ago

Platform: MacOS 12.7.2 ( Monterey ) Python: 3.12 PIP: 23.3.2

Step to reproduce:

$ pip install zoomeye
$ zoomeye init -apikey "API_KEY_FROM_ACCOUNT"

Error:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/bin/zoomeye", line 5, in <module>
    from zoomeye.cli import main
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/zoomeye/cli.py", line 19, in <module>
    from zoomeye import core
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/zoomeye/core.py", line 11, in <module>
    from zoomeye import config, file, show
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/zoomeye/show.py", line 11, in <module>
    from zoomeye import config, data, plotlib
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/zoomeye/data.py", line 19, in <module>
    from zoomeye.sdk import ZoomEye, fields_tables_host, fields_tables_web
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/zoomeye/sdk.py", line 15, in <module>
    import requests
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/requests/__init__.py", line 48, in <module>
    from charset_normalizer import __version__ as charset_normalizer_version
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/charset_normalizer/__init__.py", line 24, in <module>
    from .api import from_bytes, from_fp, from_path, normalize
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/charset_normalizer/api.py", line 3, in <module>
    from typing import BinaryIO, List, Optional, Set
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/typing.py", line 1359, in <module>
    class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/typing.py", line 1007, in __new__
    self._abc_registry = extra._abc_registry
                         ^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'Callable' has no attribute '_abc_registry'
pbuff07 commented 9 months ago

this problem may unrelated to ZoomEye-python, you can refer this issue: https://github.com/psf/black/issues/1707