Aider-AI / aider

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

Uncaught AttributeError in sendchat.py line 30 #1929

Closed AlanJack48 closed 1 week ago

AlanJack48 commented 1 week ago

Aider version: <module 'aider.version' from 'D:\Aider\aider\Lib\site-packages\aider\version.py'> Python version: 3.11.0 Platform: Windows-10-10.0.22621-SP0 Python implementation: CPython Virtual environment: Yes OS: Windows 10 (64bit) Git version: git version 2.42.0.windows.2

An uncaught exception occurred:

Traceback (most recent call last):
  File "base_coder.py", line 1129, in send_message
    yield from self.send(messages, functions=self.functions)
  File "base_coder.py", line 1421, in send
    yield from self.show_send_output_stream(completion)
  File "base_coder.py", line 1488, in show_send_output_stream
    for chunk in completion:
  File "ollama.py", line 376, in ollama_completion_stream
    raise e
  File "ollama.py", line 329, in ollama_completion_stream
    raise OllamaError(
litellm.llms.ollama.OllamaError: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "__main__.py", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 727, 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 1131, in send_message
    except retry_exceptions() as err:
           ^^^^^^^^^^^^^^^^^^
  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 1 week ago

Thank you for filing this issue.

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

aider --upgrade

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

Duplicate #1278