SWE-agent icon indicating copy to clipboard operation
SWE-agent copied to clipboard

Issue when running SWE-Agent in Codespaces

Open PierrunoYT opened this issue 9 months ago • 0 comments

Describe the bug

I'm not sure what the bug is

Steps/commands/code to Reproduce

Python run.py --model_name gpt4
--data_path https://github.com/OpenDevin/OpenDevin/issues/411
--config_file config/default_from_url.yaml

Error message/results

2024-05-03 19:25:02,829 - openai._base_client - INFO - Retrying request to /chat/completions in 0.849225 seconds 2024-05-03 19:25:03,679 - openai._base_client - INFO - Retrying request to /chat/completions in 1.987373 seconds 2024-05-03 19:25:06,405 - openai._base_client - INFO - Retrying request to /chat/completions in 0.969970 seconds 2024-05-03 19:25:07,375 - openai._base_client - INFO - Retrying request to /chat/completions in 1.987327 seconds 2024-05-03 19:25:10,579 - openai._base_client - INFO - Retrying request to /chat/completions in 0.856825 seconds 2024-05-03 19:25:11,437 - openai._base_client - INFO - Retrying request to /chat/completions in 1.659597 seconds Traceback (most recent call last): File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions yield File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 233, in handle_request resp = self._pool.handle_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 167, in handle_request raise UnsupportedProtocol( httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 952, in _request response = self._client.send( ^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 914, in send response = self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 1015, in _send_single_request response = transport.handle_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 232, in handle_request with map_httpcore_exceptions(): File "/opt/conda/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions yield File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 233, in handle_request resp = self._pool.handle_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 167, in handle_request raise UnsupportedProtocol( httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 952, in _request response = self._client.send( ^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 914, in send response = self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 1015, in _send_single_request response = transport.handle_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 232, in handle_request with map_httpcore_exceptions(): File "/opt/conda/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions yield File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 233, in handle_request resp = self._pool.handle_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 167, in handle_request raise UnsupportedProtocol( httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 952, in _request response = self._client.send( ^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 914, in send response = self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_client.py", line 1015, in _send_single_request response = transport.handle_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 232, in handle_request with map_httpcore_exceptions(): File "/opt/conda/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/opt/conda/lib/python3.11/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/workspaces/SWE-agent/run.py", line 363, in main self.run(index) File "/workspaces/SWE-agent/run.py", line 347, in run info, trajectory = self.agent.run( ^^^^^^^^^^^^^^^ File "/workspaces/SWE-agent/sweagent/agent/agents.py", line 814, in run thought, action, output = self.forward( ^^^^^^^^^^^^^ File "/workspaces/SWE-agent/sweagent/agent/agents.py", line 509, in forward thought, action, output = self.forward_with_error_check(observation, state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/SWE-agent/sweagent/agent/agents.py", line 663, in forward_with_error_check output = self.forward_model(observation, state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/SWE-agent/sweagent/agent/agents.py", line 571, in forward_model return self.model.query(self.local_history) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/tenacity/init.py", line 289, in wrapped_f return self(f, *args, **kw) ^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/tenacity/init.py", line 379, in call do = self.iter(retry_state=retry_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/tenacity/init.py", line 325, in iter raise retry_exc.reraise() ^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/tenacity/init.py", line 158, in reraise raise self.last_attempt.result() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/concurrent/futures/_base.py", line 449, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/opt/conda/lib/python3.11/site-packages/tenacity/init.py", line 382, in call result = fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/workspaces/SWE-agent/sweagent/agent/models.py", line 264, in query response = self.client.chat.completions.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_utils/_utils.py", line 277, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/resources/chat/completions.py", line 579, in create return self._post( ^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 1240, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 921, in request return self._request( ^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 976, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 1053, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 976, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 1053, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.11/site-packages/openai/_base_client.py", line 986, in _request raise APIConnectionError(request=request) from err openai.APIConnectionError: Connection error. WARNING ❌ Failed on OpenDevin__OpenDevin-i411: Connection error.
INFO Beginning environment shutdown...
INFO Agent container stopped
INFO Found image sweagent/swe-agent:latest with tags: ['sweagent/swe-agent:latest'], created: 2024-05-02T22:51:39.267174795Z for linux amd64.
DEBUG Starting container with command: docker run -i --rm --name sweagent-swe-agent-latest-a0de130965 sweagent/swe-agent:latest /bin/bash -l -m
INFO 🌱 Environment Initialized
@PierrunoYT ➜ /workspaces/SWE-agent (main) $

System Information

Windows 11 Pro

Checklist

  • [X] I'm running with the latest docker container/on the latest development version
  • [X] I've searched the other issues for a duplicate
  • [X] I have copied the full command/code that I ran
  • [X] I have copied the full log file/error message that was the result (if applicable)
  • [X] I have enclosed code/log messages in triple backticks (docs) and clicked "Preview" to make sure it's displayed correctly.

PierrunoYT avatar May 03 '24 19:05 PierrunoYT