-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
ImportError Traceback (most recent call last)
Cell In[38], line 1
----> 1 import openai
2 import os
4 opai.api_key = os.getenv("OPENAI_API_KEY")
File D:\Anaconda\envs\py38\lib\site-packages\openai\__init__.py:8
5 import os as _os
6 from typing_extensions import override
----> 8 from . import types
9 from ._types import NoneType, Transport, ProxiesTypes
10 from ._utils import file_from_path
File D:\Anaconda\envs\py38\lib\site-packages\openai\types\__init__.py:5
1 # File generated from our OpenAPI spec by Stainless.
3 from __future__ import annotations
----> 5 from .edit import Edit as Edit
6 from .image import Image as Image
7 from .model import Model as Model
File D:\Anaconda\envs\py38\lib\site-packages\openai\types\edit.py:6
3 from typing import List
4 from typing_extensions import Literal
----> 6 from .._models import BaseModel
7 from .completion_usage import CompletionUsage
9 __all__ = ["Edit", "Choice"]
File D:\Anaconda\envs\py38\lib\site-packages\openai\_models.py:20
18 import pydantic
19 import pydantic.generics
---> 20 from pydantic.fields import FieldInfo
22 from ._types import (
23 Body,
24 IncEx,
(...)
31 HttpxRequestFiles,
32 )
33 from ._utils import (
34 is_list,
35 is_given,
(...)
39 strip_not_given,
40 )
File D:\Anaconda\envs\py38\lib\site-packages\pydantic\fields.py:24
21 from pydantic_core import PydanticUndefined
22 from typing_extensions import Literal, Unpack
---> 24 from . import types
25 from ._internal import _decorators, _fields, _generics, _internal_dataclass, _repr, _typing_extra, _utils
26 from .config import JsonDict
File D:\Anaconda\envs\py38\lib\site-packages\pydantic\types.py:33
31 from annotated_types import BaseMetadata, MaxLen, MinLen
32 from pydantic_core import CoreSchema, PydanticCustomError, core_schema
---> 33 from typing_extensions import Annotated, Literal, Protocol, TypeAlias, TypeAliasType, deprecated
35 from ._internal import (
36 _core_utils,
37 _fields,
(...)
41 _validators,
42 )
43 from ._migration import getattr_migration
ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (D:\Anaconda\envs\py38\lib\site-packages\typing_extensions.py)
To Reproduce
import openai
then error happens
the typing_extensions version is 4.8.0(latest)
Code snippets
No response
OS
windows
Python version
Python 3.8.16
Library version
openai v 1.2.4
rlin88, VibhuAg, Marwen94 and TaIos
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working