I have:
If you have encountered an actual issue:
Summary
SerenaConfig.from_config_file() crashes when serena_config.yml contains an empty projects: key. The generated config in my environment ended with projects: (no list entries), which YAML loads as None; the config loader then tries to iterate it.
Steps to reproduce
Install and initialize Serena:
uv tool install -p 3.13 serena-agent@latest --prerelease=allow
serena init
In the generated/current config, the final section is:
# the list of registered project paths (updated automatically).
projects:
Then loading the config reproduces the crash:
/home/ubuntu/.local/share/uv/tools/serena-agent/bin/python - <<'PY'
from serena.config.serena_config import SerenaConfig
SerenaConfig.from_config_file()
PY
Actual result
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/home/ubuntu/.local/share/uv/tools/serena-agent/lib/python3.13/site-packages/serena/config/serena_config.py", line 846, in from_config_file
for path in loaded_commented_yaml["projects"]:
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
The same traceback was seen from serena init:
Serena version: 1.1.2
...
File ".../serena/cli.py", line 158, in init
serena_config = SerenaConfig.from_config_file()
...
TypeError: 'NoneType' object is not iterable
Expected result
Either:
- the generated template should use
projects: [], or
from_config_file() should treat a null/empty projects: value as an empty list and continue.
A config generated by Serena should not cause config loading or serena init to crash.
Environment
- Serena package:
serena-agent 1.1.2
- Install command:
uv tool install -p 3.13 serena-agent@latest --prerelease=allow
- Serena tool Python:
3.13
- Host Python:
Python 3.12.3
- OS: Ubuntu Linux on aarch64 (
Linux 6.17.0-1010-oracle)
- MCP/client context: setting up Serena MCP for a CLI agent environment; no project-specific language server involved yet
Likely cause
serena/config/serena_config.py checks only that the projects key exists, then iterates it:
if "projects" not in loaded_commented_yaml:
raise SerenaConfigError(...)
instance.projects = []
for path in loaded_commented_yaml["projects"]:
...
When YAML contains projects: with no value, loaded_commented_yaml["projects"] is None.
I have:
.serena/project.ymlIf you have encountered an actual issue:
<uv invocation> serena project health-check(not applicable: this fails during init/config loading before project setup)Summary
SerenaConfig.from_config_file()crashes whenserena_config.ymlcontains an emptyprojects:key. The generated config in my environment ended withprojects:(no list entries), which YAML loads asNone; the config loader then tries to iterate it.Steps to reproduce
Install and initialize Serena:
In the generated/current config, the final section is:
Then loading the config reproduces the crash:
Actual result
The same traceback was seen from
serena init:Expected result
Either:
projects: [], orfrom_config_file()should treat a null/emptyprojects:value as an empty list and continue.A config generated by Serena should not cause config loading or
serena initto crash.Environment
serena-agent 1.1.2uv tool install -p 3.13 serena-agent@latest --prerelease=allow3.13Python 3.12.3Linux 6.17.0-1010-oracle)Likely cause
serena/config/serena_config.pychecks only that theprojectskey exists, then iterates it:When YAML contains
projects:with no value,loaded_commented_yaml["projects"]isNone.