import os
import openai
import json
I am getting this error, please help
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
c:\Users\2me41\chatgpt\basics.ipynb Cell 1 line <cell line: 2>()
1 import os
----> 2 import openai
3 import json
File c:\Python310\lib\site-packages\openai\__init__.py:8, in <module>
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 c:\Python310\lib\site-packages\openai\types\__init__.py:5, in <module>
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 c:\Python310\lib\site-packages\openai\types\edit.py:6, in <module>
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 c:\Python310\lib\site-packages\openai\_models.py:22, in <module>
19 import pydantic.generics
20 from pydantic.fields import FieldInfo
---> 22 from ._types import (
23 Body,
24 IncEx,
25 Query,
26 ModelT,
27 Headers,
28 Timeout,
29 NotGiven,
30 AnyMapping,
31 HttpxRequestFiles,
32 )
33 from ._utils import (
34 is_list,
35 is_given,
(...)
39 strip_not_given,
40 )
41 from ._compat import PYDANTIC_V2, ConfigDict
File c:\Python310\lib\site-packages\openai\_types.py:32, in <module>
22 from typing_extensions import (
23 Literal,
24 Protocol,
(...)
28 runtime_checkable,
29 )
31 import pydantic
---> 32 from httpx import URL, Proxy, Timeout, Response, BaseTransport, AsyncBaseTransport
34 if TYPE_CHECKING:
35 from ._models import BaseModel
File c:\Python310\lib\site-packages\httpx\__init__.py:2, in <module>
1 from .__version__ import __description__, __title__, __version__
----> 2 from ._api import delete, get, head, options, patch, post, put, request, stream
3 from ._auth import Auth, BasicAuth, DigestAuth, NetRCAuth
4 from ._client import USE_CLIENT_DEFAULT, AsyncClient, Client
File c:\Python310\lib\site-packages\httpx\_api.py:4, in <module>
1 import typing
2 from contextlib import contextmanager
----> 4 from ._client import Client
5 from ._config import DEFAULT_TIMEOUT_CONFIG
6 from ._models import Response
File c:\Python310\lib\site-packages\httpx\_client.py:30, in <module>
28 from ._transports.asgi import ASGITransport
29 from ._transports.base import AsyncBaseTransport, BaseTransport
---> 30 from ._transports.default import AsyncHTTPTransport, HTTPTransport
31 from ._transports.wsgi import WSGITransport
32 from ._types import (
33 AsyncByteStream,
34 AuthTypes,
(...)
47 VerifyTypes,
48 )
File c:\Python310\lib\site-packages\httpx\_transports\default.py:97, in <module>
82 message = str(exc)
83 raise mapped_exc(message) from exc
86 HTTPCORE_EXC_MAP = {
87 httpcore.TimeoutException: TimeoutException,
88 httpcore.ConnectTimeout: ConnectTimeout,
89 httpcore.ReadTimeout: ReadTimeout,
90 httpcore.WriteTimeout: WriteTimeout,
91 httpcore.PoolTimeout: PoolTimeout,
92 httpcore.NetworkError: NetworkError,
93 httpcore.ConnectError: ConnectError,
94 httpcore.ReadError: ReadError,
95 httpcore.WriteError: WriteError,
96 httpcore.ProxyError: ProxyError,
---> 97 httpcore.UnsupportedProtocol: UnsupportedProtocol,
98 httpcore.ProtocolError: ProtocolError,
99 httpcore.LocalProtocolError: LocalProtocolError,
100 httpcore.RemoteProtocolError: RemoteProtocolError,
101 }
104 class ResponseStream(SyncByteStream):
105 def __init__(self, httpcore_stream: typing.Iterable[bytes]):
AttributeError: module 'httpcore' has no attribute 'UnsupportedProtocol'