benetech / VideoDeduplication

GNU General Public License v3.0
35 stars 12 forks source link

Resolve AttributeError: module 'typing' has no attribute '_SpecialForm' #492

Open johnhbenetech opened 2 years ago

johnhbenetech commented 2 years ago

Post installation local docker build of development branch, the videodeduplication container fails to start

Traceback (most recent call last):
  File "/anaconda/envs/winnow/bin/jupyter-notebook", line 7, in <module>
    from notebook.notebookapp import main
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/notebook/notebookapp.py", line 60, in <module>
    from tornado import httpserver
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/tornado/httpserver.py", line 32, in <module>
    from tornado.http1connection import HTTP1ServerConnection, HTTP1ConnectionParameters
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/tornado/http1connection.py", line 32, in <module>
    from tornado import gen
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/tornado/gen.py", line 94, in <module>
    import contextvars
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/contextvars/_init_.py", line 4, in <module>
    import immutables
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/immutables/_init_.py", line 18, in <module>
    from ._protocols import MapKeys as MapKeys
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/immutables/_protocols.py", line 17, in <module>
    from typing_extensions import Protocol
  File "/anaconda/envs/winnow/lib/python3.6/site-packages/typing_extensions.py", line 159, in <module>
    class _FinalForm(typing._SpecialForm, _root=True):
AttributeError: module 'typing' has no attribute '_SpecialForm'
nonoXwb commented 2 years ago

Hi, I also had this problem when running the code, did you solve it? Can you tell me how you solved this problem? Very grateful for your help

stepan-anokhin commented 2 years ago

Hi, I also had this problem when running the code, did you solve it? Can you tell me how you solved this problem? Very grateful for your help

Hi @13096676951x ! It was fixed by downgrading typing-extensions package from 4.2.0 to 4.1.1.

The root cause:

mufenglalala commented 2 years ago

Could you please tell me how to downgrade? I run pip install typing_extensions==4.1.1 directly in cmd and it prompts that I can't find the relevant version.Thank you very much!