Aider-AI / aider

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

Uncaught AttributeError in sendchat.py line 30 #2011

Closed FernandoFailla closed 3 hours ago

FernandoFailla commented 3 hours ago

Aider version: 0.56.0 Python version: 3.11.2 Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.40 Python implementation: CPython Virtual environment: Yes OS: Linux 5.15.153.1-microsoft-standard-WSL2 (64bit) Git version: git version 2.39.2

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 698, in main
    if args.lint or args.test or args.commit:
            ^^^^^^^^^^^
  File "base_coder.py", line 735, in run
    return

  File "base_coder.py", line 778, in run_one
    if self.num_reflections >= self.max_reflections:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1202, in send_message
    content += "\n^C KeyboardInterrupt"
                    ^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1885, in auto_commit
    return context
              ^^^^^
  File "repo.py", line 102, in commit
  File "repo.py", line 187, in get_commit_message
    ]

  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' has no attribute 'AnthropicError'
fry69 commented 3 hours 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