Skip to content

openai.error.AuthenticationError: <empty message> #464

@grumpyp

Description

@grumpyp

Describe the bug

Since yesterday 24.05.2023 around your outage I am facing this errors:

..
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_resources/embedding.py", line 33, in create
    response = super().create(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_requestor.py", line 230, in request
    resp, got_stream = self._interpret_response(result, stream)
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_requestor.py", line 624, in _interpret_response
    self._interpret_response_line(
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_requestor.py", line 687, in _interpret_response_line
    raise self.handle_error_response(
openai.error.AuthenticationError: <empty message>

I tried several approaches, thought LangChain would be the problem, thought a vectorstore is it, but now I think it must be something with the API as I rebuilt with several options and it all leads to the same error.

To Reproduce

openai.api_key = OPENAI_KEY or os.getenv("OPENAI_API_KEY")

# where texts can be a list of strings like 
texts = ["test", "foo"]
for i in texts:
    response = openai.Embedding.create(
        input=i,
        model="text-embedding-ada-002"
    )
    embeddings = response['data'][0]['embedding']

Code snippets

No response

OS

macOS, m1-chip

Python version

Python 3.10.9

Library version

openai==0.27.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions