searxng/searxng · error · ValueError
only SELECT query is supported
Error message
only SELECT query is supported
What it means
Error "only SELECT query is supported" thrown in searxng/searxng.
Source
Thrown at searx/engines/sqlite.py:74
database = ""
"""Filename of the SQLite DB."""
query_str = ""
"""SQL query that returns the result items."""
result_type: t.Literal["MainResult", "KeyValue"] = "KeyValue"
"""The result type can be :py:obj:`MainResult` or :py:obj:`KeyValue`."""
limit = 10
paging = True
def init(engine_settings):
if 'query_str' not in engine_settings:
raise ValueError('query_str cannot be empty')
if not engine_settings['query_str'].lower().startswith('select '):
raise ValueError('only SELECT query is supported')
@contextlib.contextmanager
def sqlite_cursor():
"""Implements a :py:obj:`Context Manager <contextlib.contextmanager>` for a
:py:obj:`sqlite3.Cursor`.
Open database in read only mode: if the database doesn't exist. The default
mode creates an empty file on the file system. See:
* https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
* https://www.sqlite.org/uri.html
"""
uri = 'file:' + database + '?mode=ro'
with contextlib.closing(sqlite3.connect(uri, uri=True)) as connect:
connect.row_factory = sqlite3.Row
with contextlib.closing(connect.cursor()) as cursor:View on GitHub (pinned to 9fea41204f)
When it happens
Trigger: Thrown at searx/engines/sqlite.py:74 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/40626ea02140554a.
Report an issue: GitHub.