Open hellno opened 3 months ago
anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}} 2024-06-04 11:06:18.613 | ERROR | sweepai.core.chat:chat_anthropic:478 - Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}} Traceback (most recent call last):
File "/Users/hellno/.pyenv/versions/3.10.13/bin/sweep", line 8, in
File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 472, in chat_anthropic content = call_anthropic(message_dicts, self.messages[0].content, self.model, use_openai=use_openai) │ │ │ │ │ │ └ False │ │ │ │ │ └ 'claude-3-opus-20240229' │ │ │ │ └ ChatGPT(messages=[Message(role='system', content="You are an expert software developer tasked with editing code to fulfill th... │ │ │ └ [Message(role='system', content="You are an expert software developer tasked with editing code to fulfill the user's request.... │ │ └ ChatGPT(messages=[Message(role='system', content="You are an expert software developer tasked with editing code to fulfill th... │ └ [{'role': 'user', 'content': 'Here is the intial user request, plan, and state of the code files:\n
\nIssue Titl... └ <function file_cache. .decorator. .wrapper at 0x15e13c1f0> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/logn/cache.py", line 109, in wrapper result = func(*args, *kwargs) │ │ └ {'use_openai': False} │ └ ([{'role': 'user', 'content': 'Here is the intial user request, plan, and state of the code files:\n \nIssue Tit... └ <function ChatGPT.chat_anthropic. args, **kwargs) │ │ └ {'model': 'claude-3-opus-20240229', 'temperature': 0.1, 'max_tokens': 4096, 'messages': [{'role': 'user', 'content': 'Here is... │ └ (<anthropic.resources.messages.Messages object at 0x15fd50e50>,) └ <function Messages.create at 0x112ab24d0> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/resources/messages.py", line 678, in create return self._post( │ └ <bound method SyncAPIClient.post of <anthropic.Anthropic object at 0x15fdcba00>> └ <anthropic.resources.messages.Messages object at 0x15fd50e50> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1208, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) │ │ │ │ │ │ │ └ anthropic.Stream[typing.Union[anthropic.types.message_start_event.MessageStartEvent, anthropic.types.message_delta_event.Mess... │ │ │ │ │ │ └ False │ │ │ │ │ └ FinalRequestOptions(method='post', url='/v1/messages', params={}, headers=NOT_GIVEN, max_retries=NOT_GIVEN, timeout=600, file... │ │ │ │ └ <class 'anthropic.types.message.Message'> │ │ │ └ <function SyncAPIClient.request at 0x112a932e0> │ │ └ <anthropic.Anthropic object at 0x15fdcba00> │ └ ~ResponseT └ <function cast at 0x10125c670> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 897, in request return self._request( │ └ <function SyncAPIClient._request at 0x112a93370> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( │ └ <function SyncAPIClient._retry_request at 0x112a93400> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( │ └ <function SyncAPIClient._request at 0x112a93370> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( │ └ <function SyncAPIClient._retry_request at 0x112a93400> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( │ └ <function SyncAPIClient._request at 0x112a93370> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 988, in _request raise self._make_status_error_from_response(err.response) from None │ └ <function BaseClient._make_status_error_from_response at 0x112a91630> └ <anthropic.Anthropic object at 0x15fdcba00>.call_anthropic at 0x15e13c160> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 447, in call_anthropic response = client.messages.create( │ │ └ <function Messages.create at 0x112ab2560> │ └ <anthropic.resources.messages.Messages object at 0x15fd50e50> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_utils/_utils.py", line 275, in wrapper return func(
anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}} 2024-06-04 11:06:50.640 | ERROR | sweepai.agents.modify:modify:493 - Error in chat_anthropic: Anthropic call failed 2024-06-04 11:06:50.641 | ERROR | sweepai.agents.modify_file:modify_file:80 - Error: 'NoneType' object has no attribute 'add_chat' 2024-06-04 11:06:50.644 | ERROR | sweepai.agents.modify_file:modify_file:81 - Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 472, in chat_anthropic content = call_anthropic(message_dicts, self.messages[0].content, self.model, use_openai=use_openai) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/logn/cache.py", line 109, in wrapper result = func(*args, *kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 447, in call_anthropic response = client.messages.create( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_utils/_utils.py", line 275, in wrapper return func(args, **kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/resources/messages.py", line 678, in create return self._post( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1208, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 897, in request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 988, in _request raise self._make_status_error_from_response(err.response) from None anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}}
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify.py", line 485, in modify function_calls_string = chat_gpt.chat_anthropic( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 482, in chat_anthropic raise Exception("Anthropic call failed") from e Exception: Anthropic call failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify_file.py", line 72, in modify_file new_files = modify( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify.py", line 494, in modify chat_logger.add_chat( AttributeError: 'NoneType' object has no attribute 'add_chat'
2024-06-04 11:06:50.645 | ERROR | sweepai.core.sweep_bot:handle_modify_file_main:799 - 'NoneType' object has no attribute 'add_chat' 2024-06-04 11:06:50.648 | INFO | sweepai.core.sweep_bot:handle_modify_file_main:833 - Error in handle_modify_file: Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 472, in chat_anthropic content = call_anthropic(message_dicts, self.messages[0].content, self.model, use_openai=use_openai) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/logn/cache.py", line 109, in wrapper result = func(*args, *kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 447, in call_anthropic response = client.messages.create( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_utils/_utils.py", line 275, in wrapper return func(args, **kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/resources/messages.py", line 678, in create return self._post( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1208, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 897, in request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 988, in _request raise self._make_status_error_from_response(err.response) from None anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}}
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify.py", line 485, in modify function_calls_string = chat_gpt.chat_anthropic( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 482, in chat_anthropic raise Exception("Anthropic call failed") from e Exception: Anthropic call failed
Having the same error in production, exactly the same
Details
here are my error logs:
{"client_error":false,"code":529,"detail":"Overloaded"} raise self ._make_status_error_from_response(err.response) from None anthropic. InternalServerError: Error code: 529 I'type, ' error, ' error, I'type, ' overloaded error, ' message, ' Overloaded, 11 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.10/site-packages/sweepai/agents/modify.py" f unction_calls_string chat_gpt. chat_anthropic( File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.1o/site-packages/sweepai/core/chat.py" raise Exception("Anthropic call f ailed" ) from e Exception: Anthropic call f ailed line 583, in modify line 482, in chat_anthropic During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.1o/site-packages/sweepai/agents/modify_f ile.py" new f iles modify( File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.10/site-packages/sweepai/agents/modify.py" chat_logger. add_chat ( AttributeError: 'NoneType' object has no attribute 'add chat, line 72, in modify_file line 592, in modify
Branch
No response