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.
https://princeton-nlp.github.io/SWE-agent/
MIT License
11.9k stars 1.19k forks source link

Improve error message for missing `--traj_path` in `run_replay` #523

Closed klieret closed 1 month ago

klieret commented 1 month ago

Currently:

 python run_replay.py --config_file config/default_from_url.yaml --instance_filter sympy__sympy-23117 --data_path /Users/fuchur/Documents/24/git_sync/p-swe-agent/data/swe-bench/swe-bench-lite-test-split-1-of-2.json
Traceback (most recent call last):
  File "/Users/fuchur/Documents/24/git_sync/SWE-agent/run_replay.py", line 134, in <module>
    main(**vars(args), forward_args=remaining_args)
  File "/Users/fuchur/Documents/24/git_sync/SWE-agent/run_replay.py", line 115, in main
    process_single_traj(traj_path, config_file, data_path, suffix, forward_args=forward_args)
  File "/Users/fuchur/Documents/24/git_sync/SWE-agent/run_replay.py", line 35, in process_single_traj
    if traj_path.endswith(".yaml"):
AttributeError: 'NoneType' object has no attribute 'endswith'