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
- Fix: Ensure pydantic-settings env prefix set Possible cause for #978 — committed to SWE-agent/SWE-agent by klieret 2 years ago
- Fix: Ensure pydantic-settings env prefix set (#1018) Possible cause for #978 — committed to SWE-agent/SWE-agent by klieret 2 years ago
OK, I can reproduce this on Google collab. Very strange.
Thanks!
I meant just this:
and then if that works, try adding back your
--envcommands and see if one of them triggers itUsually 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.
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=humanand following the exact commands from the tutorial to rule out any other problems.