searxng/searxng · error · ValueError
Invalid settings.yml
Error message
Invalid settings.yml
What it means
Error "Invalid settings.yml" thrown in searxng/searxng.
Source
Thrown at searx/settings_defaults.py:178
# Expected `str`, got `int` - at `foo.bar.name`
msg = str(e)
msg = msg.replace("`$.", "`" + ".".join([*path_list, key]) + ".")
logger.error(msg)
error = True
elif isinstance(value, SettingsValue):
try:
settings[key] = value(settings.get(key, _UNDEFINED))
except Exception as e: # pylint: disable=broad-except
# don't stop now: check other values
msg = ".".join([*path_list, key]) + f": {e}"
logger.error(msg)
error = True
elif isinstance(value, dict):
error = error or apply_schema(settings.setdefault(key, {}), schema[key], [*path_list, key])
else:
settings.setdefault(key, value)
if len(path_list) == 0 and error:
raise ValueError("Invalid settings.yml")
return error
SCHEMA: dict[str, t.Any] = {
'general': {
'debug': SettingsValue(bool, False, 'SEARXNG_DEBUG'),
'instance_name': SettingsValue(str, 'SearXNG'),
'privacypolicy_url': SettingsValue((None, False, str), None),
'contact_url': SettingsValue((None, False, str), None),
'donation_url': SettingsValue((bool, str), "https://docs.searxng.org/donate.html"),
'enable_metrics': SettingsValue(bool, True),
'open_metrics': SettingsValue(str, ''),
},
'brand': SettingsBrand,
'search': {
'safe_search': SettingsValue((0, 1, 2), 0),
'autocomplete': SettingsValue(str, 'duckduckgo'),
'autocomplete_min': SettingsValue(int, 4),View on GitHub (pinned to 9fea41204f)
When it happens
Trigger: Thrown at searx/settings_defaults.py:178 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of searxng/searxng@9fea41204f (2026-08-27).
Data as JSON: /api/errors/80067481d2f90c7e.
Report an issue: GitHub.