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

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

Open
johnhbenetech opened this issue Apr 18, 2022 · 3 comments

Comments

@johnhbenetech
Copy link
Member

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
Copy link

nonoXwb commented Apr 21, 2022

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 added a commit to stepan-anokhin/VideoDeduplication that referenced this issue Apr 21, 2022
@stepan-anokhin
Copy link
Collaborator

stepan-anokhin commented Apr 21, 2022

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:

  • We use Python 3.6
  • typing-extensions 4.2.0 requires Python >= 3.7. (the previous version requires Python >= 3.6)
  • pip ignores the Python version requirements and happily installs incompatible packages.

@mufenglalala
Copy link

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!

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

4 participants