Skip to content

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

Description

@johnhbenetech

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'

Activity

  1. nonoXwb commented on Apr 21, 2022

    @nonoXwb

    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

  2. stepan-anokhin commented on Apr 21, 2022

    @stepan-anokhin
    Collaborator

    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.
  3. mufenglalala commented on May 15, 2022

    @mufenglalala

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions