pola-rs/polars · error · ValueError
engine must be one of {{'connectorx', 'adbc'}}, got {engine!
Error message
engine must be one of {{'connectorx', 'adbc'}}, got {engine!r} What it means
ValueError raised by read_database's engine validation: the engine argument is neither 'connectorx' nor 'adbc', so no database reader can be selected. It fires in the dispatch chain after the specialized engines fail to match, naming the received engine value.
Source
Thrown at py-polars/src/polars/io/database/functions.py:533
schema_overrides=schema_overrides,
pre_execution_query=pre_execution_query,
)
elif engine == "adbc":
if not isinstance(query, str):
msg = f"only a single SQL query string is accepted for adbc, got a {qualified_type_name(query)!r} type"
raise ValueError(msg)
if pre_execution_query:
msg = "the 'adbc' engine does not support use of `pre_execution_query`"
raise ValueError(msg)
return _read_sql_adbc(
query,
connection_uri=uri,
schema_overrides=schema_overrides,
execute_options=execute_options,
)
else:
msg = f"engine must be one of {{'connectorx', 'adbc'}}, got {engine!r}"
raise ValueError(msg)
View on GitHub (pinned to 4db92c12c0)
Solutions
- Set engine to 'connectorx' or 'adbc'; other engine names are invalid.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at py-polars/src/polars/io/database/functions.py:532 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pola-rs/polars@4db92c12c0 (2026-08-19).
Data as JSON: /api/errors/ffb212b660ea7b06.
Report an issue: GitHub.