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

Uncaught ImportError in openai.py line 52 #3649

Open
rish-dataengineer opened this issue Mar 26, 2025 · 0 comments
Open

Uncaught ImportError in openai.py line 52 #3649

rish-dataengineer opened this issue Mar 26, 2025 · 0 comments

Comments

@rish-dataengineer
Copy link

Aider version: 0.78.0
Python version: 3.10.12
Platform: Linux-6.8.0-52-generic-x86_64-with-glibc2.35
Python implementation: CPython
Virtual environment: No
OS: Linux 6.8.0-52-generic (64bit)
Git version: git version 2.49.0

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
  File "main.py", line 1106, in main
    coder.run()
  File "base_coder.py", line 856, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 903, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1337, in send_message
    self.mdstream = self.io.get_assistant_mdstream()
  File "exceptions.py", line 58, in __init__
    self._load()
  File "exceptions.py", line 61, in _load
    import litellm
  File "__init__.py", line 9, in <module>
    from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
  File "http_handler.py", line 10, in <module>
    from litellm.litellm_core_utils.logging_utils import track_llm_api_timing
  File "logging_utils.py", line 7, in <module>
    from litellm.types.utils import (
  File "utils.py", line 26, in <module>
    from ..litellm_core_utils.core_helpers import map_finish_reason
  File "core_helpers.py", line 8, in <module>
    from litellm.types.llms.openai import AllMessageValues
  File "openai.py", line 52, in <module>
    from pydantic import BaseModel, Discriminator, Field, PrivateAttr
ImportError: cannot import name 'Discriminator' from 'pydantic' (/home/auriga/.local/lib/python3.10/site-packages/pydantic/__init__.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant