Skip to content

Commit

Permalink
More helpful message if --repo_path doesn't exist
Browse files Browse the repository at this point in the history
Closes #763
Also see #761
  • Loading branch information
klieret committed Sep 12, 2024
1 parent 55fec07 commit 4f19864
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sweagent/environment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,13 @@ def get_instances(
Returns:
List of instances as dictionaries
"""
if file_path and not Path(file_path).exists():
msg = f"Specified problem statement path {file_path} does not exist"
raise FileNotFoundError(msg)

if repo_path and not Path(repo_path).exists():
msg = f"Specified repository path {repo_path} does not exist"
raise FileNotFoundError(msg)

def instance_from_dict(instances):
ib = InstanceBuilder(token=token)
Expand Down

0 comments on commit 4f19864

Please sign in to comment.