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

Cannot import name 'TypedDict' from 'typing' error in Python 3.7 #172

Closed
JasonWeill opened this issue May 12, 2023 · 0 comments · Fixed by #184
Closed

Cannot import name 'TypedDict' from 'typing' error in Python 3.7 #172

JasonWeill opened this issue May 12, 2023 · 0 comments · Fixed by #184
Assignees
Labels
bug Something isn't working @jupyter-ai/core

Comments

@JasonWeill
Copy link
Collaborator

Description

When I try to run %load_ext jupyter_ai inside a Jupyter notebook with Python 3.7, I see an error that TypedDict is not available in the typing module

/opt/conda/lib/python3.7/site-packages/jupyter_ai/init.py in
1 from ._version import version
----> 2 from .extension import AiExtension
3 from .engine import GPT3ModelEngine
4
5 def _jupyter_labextension_paths():

/opt/conda/lib/python3.7/site-packages/jupyter_ai/extension.py in
3 from importlib_metadata import entry_points
4 import inspect
----> 5 from .engine import BaseModelEngine
6
7 class AiExtension(ExtensionApp):

/opt/conda/lib/python3.7/site-packages/jupyter_ai/engine.py in
1 from abc import abstractmethod, ABC, ABCMeta
----> 2 from typing import Dict, TypedDict, Literal, List
3 import openai
4 from traitlets.config import LoggingConfigurable, Unicode
5 from .task_manager import DescribeTaskResponse

ImportError: cannot import name 'TypedDict' from 'typing' (/opt/conda/lib/python3.7/typing.py)

The final code in the stacktrace is here:

Context

  • Operating System and version: Amazon Linux 2 (Linux default 4.14.311-233.529.amzn2.x86_64 Improve development setup #1 SMP Thu Mar 23 09:54:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux)
  • Browser and version: Firefox ESR 102.10esr
  • JupyterLab version: 3.6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @jupyter-ai/core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant