mlflow/mlflow · error · MlflowException

Creating trace location is not supported on this backend.

Error message

Creating trace location is not supported on this backend.

What it means

_create_or_get_trace_location requires a Databricks tracking URI and a store implementing create_or_get_trace_location (Unity Catalog location creation). Otherwise the client raises this MlflowException instead of attempting the call.

Source

Thrown at mlflow/tracing/client.py:855

                sql_warehouse_id=sql_warehouse_id,
            )
        raise MlflowException(
            "Setting storage location is not supported on non-Databricks backends."
        )

    def _get_trace_location(self, telemetry_profile_id: str) -> UnityCatalog:
        if is_databricks_uri(self.tracking_uri) and hasattr(self.store, "get_trace_location"):
            return self.store.get_trace_location(telemetry_profile_id)
        raise MlflowException("Getting trace location by ID is not supported on this backend.")

    def _create_or_get_trace_location(
        self, location: UnityCatalog, sql_warehouse_id: str | None = None
    ) -> UnityCatalog:
        if is_databricks_uri(self.tracking_uri) and hasattr(
            self.store, "create_or_get_trace_location"
        ):
            return self.store.create_or_get_trace_location(location, sql_warehouse_id)
        raise MlflowException("Creating trace location is not supported on this backend.")

    def _link_trace_location(self, experiment_id: str, location: UnityCatalog) -> None:
        if is_databricks_uri(self.tracking_uri) and hasattr(self.store, "link_trace_location"):
            self.store.link_trace_location(experiment_id, location)
            return
        raise MlflowException("Linking trace location is not supported on this backend.")

    def _unset_experiment_trace_location(
        self, experiment_id: str, location: UCSchemaLocation | UnityCatalog
    ) -> None:
        if is_databricks_uri(self.tracking_uri):
            self.store.unset_experiment_trace_location(str(experiment_id), location)
        else:
            raise MlflowException(
                "Clearing storage location is not supported on non-Databricks backends."
            )

    def _create_issue(

View on GitHub (pinned to 6a27f2decc)

Solutions

  1. Set the tracking URI to Databricks before resolving trace locations.
  2. Upgrade the MLflow server so the Databricks store supports create_or_get_trace_location.
  3. Skip UC trace-location resolution when running on non-Databricks backends.

Example fix

null
Defensive patterns

Strategy: validation

Validate before calling

import mlflow
from mlflow.tracking._tracking_service.utils import is_databricks_uri
if not is_databricks_uri(mlflow.get_tracking_uri()):
    raise RuntimeError("create_or_get_trace_location requires Databricks")

Try / catch

try:
    loc = client._create_or_get_trace_location(location, sql_warehouse_id)
except MlflowException as e:
    log.error("UC trace location creation unsupported: %s", e)
    raise

Prevention

When it happens

Trigger: Calling _resolve_experiment_to_trace_location (which invokes _create_or_get_trace_location) while the tracking URI is local/SQL/non-Databricks, or the store lacks the method.

Common situations: Configuring UC trace destinations in an environment not authenticated/pointed at Databricks; older server versions without the API.

Related errors


AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29). Data as JSON: /api/errors/da3b8a6897715bd7. Report an issue: GitHub.