A customer had a Streamlit app that it previously worked without any problems, but it started failing recently. I believe that after a recent update—likely related to the Cognite libraries—the app stopped working and now throws the following error:
ImportError: cannot import name 'NoExtraItems' from 'typing_extensions'
(/lib/python3.12/site-packages/typing_extensions.py)
Traceback:
File "streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
File "streamlit/runtime/scriptrunner/script_runner.py", line 588, in code_to_exec
File "/home/pyodide/mainv3.py", line 7, in <module>
from cognite.pygen import generate_sdk_notebook
File "/lib/python3.12/site-packages/cognite/pygen/__init__.py", line 6, in <module>
from ._generator import generate_sdk, generate_sdk_notebook
File "/lib/python3.12/site-packages/cognite/pygen/_generator.py", line 19, in <module>
from cognite.pygen._core.generators import SDKGenerator
File "/lib/python3.12/site-packages/cognite/pygen/_core/generators.py", line 19, in <module>
from cognite.pygen.utils.helper import get_pydantic_version
File "/lib/python3.12/site-packages/cognite/pygen/utils/__init__.py", line 1, in <module>
from .cdf import clean_model, clean_model_interactive, clean_space, load_cognite_client_from_toml
File "/lib/python3.12/site-packages/cognite/pygen/utils/cdf.py", line 40, in <module>
from cognite.pygen.utils.text import to_snake
File "/lib/python3.12/site-packages/cognite/pygen/utils/text.py", line 5, in <module>
import inflect
File "/lib/python3.12/site-packages/inflect/__init__.py", line 81, in <module>
from typeguard import typechecked
File "/lib/python3.12/site-packages/typeguard/__init__.py", line 4, in <module>
from ._checkers import TypeCheckerCallable as TypeCheckerCallable
File "/lib/python3.12/site-packages/typeguard/_checkers.py", line 52, in <module>
from typing_extensions import NoExtraItems
Any guidance or suggestions will be greatly appreciated. Thankyou!!!
Check the
documentation
Ask the
Community
Take a look
at
Academy
Cognite
Status
Page
Contact
Cognite Support