Aider-AI / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
20.96k stars 1.94k forks source link

Uncaught AttributeError in sendchat.py line 30 #1959

Closed acacio closed 2 weeks ago

acacio commented 2 weeks ago

Aider version: 0.59.1 Python version: 3.12.7 Platform: macOS-14.7-arm64-arm-64bit Python implementation: CPython Virtual environment: Yes OS: Darwin 23.6.0 (64bit) Git version: git version 2.47.0.rc0.187.ge670bccf7e-goog

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 757, in main
    coder.run()
  File "base_coder.py", line 730, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 773, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1212, in send_message
    saved_message = self.auto_commit(edited)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1895, in auto_commit
    res = self.repo.commit(fnames=edited, context=context, aider_edits=True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 110, in commit
    commit_message = self.get_commit_message(diffs, context)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 195, in get_commit_message
    commit_message = simple_send_with_retries(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "sendchat.py", line 38, in wrapper
    retry_exceptions(),
    ^^^^^^^^^^^^^^^^^^
  File "sendchat.py", line 30, in retry_exceptions
    litellm.llms.anthropic.chat.AnthropicError,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'litellm.llms.anthropic.chat' has no attribute 'AnthropicError'
fry69 commented 2 weeks ago

Thank you for filing this issue.

The fix is in the latest version (0.59.1), please update aider with

aider --upgrade

Please do not forget to exit and restart aider after it updated itself.

Duplicate #1278