Skip to content

AttributeError: module 'openai' has no attribute 'error' #1564

@sahilrajput03

Description

@sahilrajput03

Describe the bug

pip --version
pip 24.2 from /Users/apple/Documents/github_repos/test1/venv/lib/python3.13/site-packages/pip (python 3.13)

I am getting this error:

(venv) apple@apples-MacBook-Pro test1 % oaieval --help
Traceback (most recent call last):
  File "/Users/apple/Documents/github_repos/test1/venv/bin/oaieval", line 5, in <module>
    from evals.cli.oaieval import main
  File "/Users/apple/Documents/github_repos/test1/venv/lib/python3.13/site-packages/evals/__init__.py", line 2, in <module>
    from .completion_fns.openai import (
    ...<3 lines>...
    )
  File "/Users/apple/Documents/github_repos/test1/venv/lib/python3.13/site-packages/evals/completion_fns/openai.py", line 13, in <module>
    from evals.utils.api_utils import (
    ...<2 lines>...
    )
  File "/Users/apple/Documents/github_repos/test1/venv/lib/python3.13/site-packages/evals/utils/api_utils.py", line 12, in <module>
    openai.error.ServiceUnavailableError,
    ^^^^^^^^^^^^
AttributeError: module 'openai' has no attribute 'error'

To Reproduce

mkdir test1; cd test1
python -m venv venv
pip install evals
oaieval --help

Code snippets

No response

OS

sequioa 15.0.1 (24A348)

Python version

Python 3.13.0

Library version

latest

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