infiniflow/ragflow · error · Exception
Missing dependency 'trino'. Please install: pip install trin
Error message
Missing dependency 'trino'. Please install: pip install trino
What it means
Error "Missing dependency 'trino'. Please install: pip install trino" thrown in infiniflow/ragflow.
Source
Thrown at agent/tools/exesql.py:151
elif self._param.db_type == "oceanbase":
db = pymysql.connect(db=self._param.database, user=self._param.username, host=safe_host, port=self._param.port, password=self._param.password, charset="utf8mb4")
elif self._param.db_type == "postgres":
db = psycopg2.connect(dbname=self._param.database, user=self._param.username, host=safe_host, port=self._param.port, password=self._param.password)
elif self._param.db_type == "mssql":
conn_str = (
r"DRIVER={ODBC Driver 17 for SQL Server};"
r"SERVER=" + safe_host + "," + str(self._param.port) + ";"
r"DATABASE=" + self._param.database + ";"
r"UID=" + self._param.username + ";"
r"PWD=" + self._param.password
)
db = pyodbc.connect(conn_str)
elif self._param.db_type == "trino":
try:
import trino
from trino.auth import BasicAuthentication
except Exception:
raise Exception("Missing dependency 'trino'. Please install: pip install trino")
def _parse_catalog_schema(db: str):
if not db:
return None, None
if "." in db:
c, s = db.split(".", 1)
elif "/" in db:
c, s = db.split("/", 1)
else:
c, s = db, "default"
return c, s
catalog, schema = _parse_catalog_schema(self._param.database)
if not catalog:
raise Exception("For Trino, `database` must be 'catalog.schema' or at least 'catalog'.")
http_scheme = "https" if os.environ.get("TRINO_USE_TLS", "0") == "1" else "http"
auth = NoneView on GitHub (pinned to 554fb1133a)
Solutions
- Install the trino package: pip install trino.
- Rebuild the environment with all extras so the trino dependency is present.
Example fix
pip install trino
When it happens
Trigger: Thrown at agent/tools/exesql.py:151 when the library encounters an invalid state.
Common situations: The ExeSQL tool targets a Trino database but the optional trino driver is not installed in the runtime environment; installing the dependency prevents this error.
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/c8040299b31fdc17.
Report an issue: GitHub.