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 AttributeError in sendchat.py line 30 #1669

Closed
maksiam opened this issue Sep 23, 2024 · 1 comment
Closed

Uncaught AttributeError in sendchat.py line 30 #1669

maksiam opened this issue Sep 23, 2024 · 1 comment

Comments

@maksiam
Copy link

maksiam commented Sep 23, 2024

Aider version: 0.56.0
Python version: 3.10.12
Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
Python implementation: CPython
Virtual environment: Yes
OS: Linux 5.15.0-60-generic (64bit)
Git version: git version 2.34.1

An uncaught exception occurred:

Traceback (most recent call last):
  File "base_coder.py", line 1124, in send_message
    continue
  File "base_coder.py", line 1413, in send
    format_content("ASSISTANT", self.partial_response_content),
  File "base_coder.py", line 1408, in send
    self.keyboard_interrupt()
  File "base_coder.py", line 1482, in show_send_output_stream
    func = chunk.choices[0].delta.function_call
  File "utils.py", line 10022, in __next__
    chunk = next(self.completion_stream)
  File "_streaming.py", line 43, in __next__
    return self._iterator.__next__()
  File "_streaming.py", line 58, in __stream__
    for sse in iterator:
  File "_streaming.py", line 50, in _iter_events
    yield from self._decoder.iter_bytes(self.response.iter_bytes())
  File "_streaming.py", line 280, in iter_bytes
    for chunk in self._iter_chunks(iterator):
  File "_streaming.py", line 291, in _iter_chunks
    for chunk in iterator:
  File "_models.py", line 831, in iter_bytes
    for raw_bytes in self.iter_raw():
  File "_models.py", line 885, in iter_raw
    for raw_stream_bytes in self.stream:
  File "_client.py", line 127, in __iter__
    for chunk in self._stream:
  File "default.py", line 116, in __iter__
    for part in self._httpcore_stream:
  File "connection_pool.py", line 367, in __iter__
    raise exc from None
  File "connection_pool.py", line 363, in __iter__
    for part in self._stream:
  File "http11.py", line 349, in __iter__
    raise exc
  File "http11.py", line 341, in __iter__
    for chunk in self._connection._receive_response_body(**kwargs):
  File "http11.py", line 210, in _receive_response_body
    event = self._receive_event(timeout=timeout)
  File "http11.py", line 224, in _receive_event
    data = self._network_stream.read(
  File "sync.py", line 126, in read
    return self._sock.recv(max_bytes)
  File "ssl.py", line 1288, in recv
    return self.read(buflen)
  File "ssl.py", line 1161, in read
    return self._sslobj.read(len)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
  File "main.py", line 698, in main
    return 1
  File "base_coder.py", line 735, in run
    return self.io.get_input(
  File "base_coder.py", line 778, in run_one
    def check_for_urls(self, inp):
  File "base_coder.py", line 1126, in send_message
    interrupted = True
  File "sendchat.py", line 30, in retry_exceptions
    litellm.llms.anthropic.chat.AnthropicError,
AttributeError: module 'litellm.llms.anthropic' has no attribute 'AnthropicError'

@fry69
Copy link
Collaborator

fry69 commented Sep 23, 2024

Thank you for filing this issue.

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

aider --upgrade

Duplicate #1278

@fry69 fry69 closed this as completed Sep 23, 2024
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