SWE-agent: error parsing value for field "env" from source "EnvSettingsSource"

Describe the bug

Have pulled model to local repo and ollama works as in the litellm document, but code in the SWE-agent tutorial not working

Steps/commands/code to Reproduce

!sweagent run \
  --agent.model.name=mistral:7b \
  --env.repo.github_url=https://github.com/SWE-agent/test-repo \
  --problem_statement.github_url=https://github.com/SWE-agent/test-repo/issues/1

### Error message/results


๐Ÿ‘‹ INFO     This is SWE-agent version 1.0.0 (hash='52f6b455a1237b9074418c1884b872a88dc15259') with  
            SWE-ReX version 1.2.0 (rex_hash='unavailable').                                         
๐Ÿ”ง INFO     Loading default config from /kaggle/working/SWE-agent/config/anthropic_filemap.yaml,    
            because no other config file is specified. Specify --no_config_file to disable this.    
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ SettingsError                                                                                    โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ error parsing value for field "env" from source "EnvSettingsSource"                              โ”‚
โ”‚                                                                                                  โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ Hints:                                                                                           โ”‚
โ”‚ Run `sweagent <subcommand> --help` for usage examples.                                           โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ Common mistakes:                                                                                 โ”‚
โ”‚ - You used dashes instead of underscores (wrong: `--num-workers`, correct: `--num_workers`).     โ”‚
โ”‚ - You forgot about part of the hierarchy (wrong: `--model.name`, correct: `--agent.model.name`). โ”‚
โ”‚                                                                                                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/kaggle/working/SWE-agent/sweagent/__main__.py", line 4, in <module>
    main()
  File "/kaggle/working/SWE-agent/sweagent/run/run.py", line 87, in main
    run_single_main(remaining_args)
  File "/kaggle/working/SWE-agent/sweagent/run/run_single.py", line 213, in run_from_cli
    run_from_config(BasicCLI(RunSingleConfig, help_text=help_text).get_config(args))  # type: ignore
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/kaggle/working/SWE-agent/sweagent/run/common.py", line 350, in get_config
    raise RuntimeError(msg) from None
RuntimeError: Invalid command line arguments. Please check the above output in the box.

System Information

jupyter notebook, python3.11, ollama

Checklist

  • Iโ€™m running with the latest docker container/on the latest development version (i.e., I ran git pull))
  • 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.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments

OK, I can reproduce this on Google collab. Very strange.

Image

Thanks!

I meant just this:

 sweagent run --agent.model.name human

and then if that works, try adding back your --env commands and see if one of them triggers it

Usually this will prompt you for actions (which wonโ€™t work with ipynb if you call it as a subshell โ€“ but weโ€™d see if the error still happens).

How are you running your notebook? i.e., are you running it locally on a Windows/macos/etc. or on some cloud service?

No problem when Iโ€™m trying, I wonder what youโ€™re running into. Please try to first run what I proposed before to narrow it down further.

Image

OK, Iโ€™ll try and take a look at that today. Though it would help with reproduction if you could reproduce this with a simple API model or --agent.model.name=human and following the exact commands from the tutorial to rule out any other problems.