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 _types.py line 10 #1444

Closed
dahromy opened this issue Sep 9, 2024 · 1 comment
Closed

Uncaught ImportError in _types.py line 10 #1444

dahromy opened this issue Sep 9, 2024 · 1 comment

Comments

@dahromy
Copy link

dahromy commented Sep 9, 2024

Aider version: 0.55.0
Python version: 3.10.12
Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python implementation: CPython
Virtual environment: No
OS: Linux 5.15.153.1-microsoft-standard-WSL2 (64bit)
Git version: git version 2.45.2

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
  File "main.py", line 694, in main
    coder.run()
  File "base_coder.py", line 730, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 767, in run_one
    message = self.preproc_user_input(user_message)
  File "base_coder.py", line 756, in preproc_user_input
    return self.commands.run(inp)
  File "commands.py", line 221, in run
    return self.do_run(matching_commands[0][1:], rest_inp)
  File "commands.py", line 196, in do_run
    return cmd_method(args)
  File "commands.py", line 235, in cmd_commit
    self.raw_cmd_commit(args)
  File "commands.py", line 249, in raw_cmd_commit
    self.coder.repo.commit(message=commit_message)
  File "repo.py", line 101, in commit
    commit_message = self.get_commit_message(diffs, context)
  File "repo.py", line 186, in get_commit_message
    commit_message = simple_send_with_retries(
  File "sendchat.py", line 38, in wrapper
    retry_exceptions(),
  File "sendchat.py", line 24, in retry_exceptions
    litellm.exceptions.APIConnectionError,
  File "llm.py", line 23, in __getattr__
    self._load_litellm()
  File "llm.py", line 30, in _load_litellm
    self._lazy_module = importlib.import_module("litellm")
  File "__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "__init__.py", line 20, in <module>
    from litellm.proxy._types import (
  File "_types.py", line 10, in <module>
    from pydantic import BaseModel, ConfigDict, Extra, Field, Json, model_validator
ImportError: cannot import name 'model_validator' from 'pydantic' (/home/dahromy/.local/lib/python3.10/site-packages/pydantic/__init__.cpython-310-x86_64-linux-gnu.so)

@paul-gauthier
Copy link
Owner

Thanks for trying aider and filing this issue.

How did you install aider? What environment are you using?

It looks like you don't have the correct set of dependencies installed.

You may want to read the docs on installing aider with pipx. Particularly if you are trying to use aider on replit.

https://aider.chat/docs/install/pipx.html

I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.

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

2 participants