princeton-nlp / SWE-agent

SWE-agent takes a GitHub issue and tries to automatically fix it, using GPT-4, or your LM of choice. It solves 12.47% of bugs in the SWE-bench evaluation set and takes just 1 minute to run.

Home Page:https://princeton-nlp.github.io/SWE-agent/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to clean repository: /bin/bash: line 53: cd: SWE-agent__test-repo: No such file or directory

vpicone opened this issue · comments

Describe the bug

When running the recommended CLI command:

python run.py   --model_name gpt4   --data_path https://github.com/SWE-agent/test-repo/issues/1   --config_file config/default_from_url.yaml   --per_instance_cost_limit 2.00

I get the following error:

WARNING  ❌ Failed on SWE-agent__test-repo-i1: Failed to clean repository: /bin/bash: line 53: cd: SWE-agent__test-repo: No such file or directory        

Steps/commands/code to Reproduce

  1. Start GH Codespace
  2. Update keys to include OPENAPI key
  3. Run the recommended command

Error message/results

DEBUG    Environment initialization took 9.00 seconds                                                                                                      
INFO     ▶️  Beginning task 0                                                                                                                               
INFO     Trying to clone from non-mirror...                                                                                                                
ERROR    Failed to clean repository: /bin/bash: line 53: cd: SWE-agent__test-repo: No such file or directory                                               
                                                                                                                                                           
INFO     Beginning environment shutdown...                                                                                                                 
INFO     Agent container stopped                                                                                                                           
Traceback (most recent call last):
  File "/workspaces/SWE-agent/run.py", line 377, in main
    self.run(index)
  File "/workspaces/SWE-agent/run.py", line 341, in run
    observation, info = self.env.reset(index)
                        ^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/SWE-agent/sweagent/environment/swe_env.py", line 322, in reset
    self.communicate_with_handling(
  File "/workspaces/SWE-agent/sweagent/environment/swe_env.py", line 698, in communicate_with_handling
    raise RuntimeError(msg)
RuntimeError: Failed to clean repository: /bin/bash: line 53: cd: SWE-agent__test-repo: No such file or directory

WARNING  ❌ Failed on SWE-agent__test-repo-i1: Failed to clean repository: /bin/bash: line 53: cd: SWE-agent__test-repo: No such file or directory 

System Information

GH CodeSpaces default setup with the following keys.cfg:

# All keys are commented out by default. Make sure to remove the leading '#' of the relevant lines
# GITHUB_TOKEN: 'GitHub Token to clone private repos'
OPENAI_API_KEY: 'sk-proj-XXXXXXXXXXXXXXX'
# ANTHROPIC_API_KEY: 'Anthropic API Key Here if using Anthropic Model'
# TOGETHER_API_KEY: 'Together API Key Here if using Together Model'
# AZURE_OPENAI_API_KEY: 'Azure OpenAI API Key Here if using Azure OpenAI Model'
# AZURE_OPENAI_ENDPOINT: 'Azure OpenAI Endpoint Here if using Azure OpenAI Model'
# AZURE_OPENAI_DEPLOYMENT: 'Azure OpenAI Deployment Here if using Azure OpenAI Model'
# AZURE_OPENAI_API_VERSION: 'Azure OpenAI API Version Here if using Azure OpenAI Model'
# OPENAI_API_BASE_URL: 'LM base URL here if using Local or alternative api Endpoint'

Checklist

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

Huh, that's a new one, let me investigate.

I can reproduce this on GH codespace and locally

This bug was introduced in 8f93ace

Thanks for reporting this @vpicone, this was my bad. You can restart the codespace and it should work :)