chroma-core/chroma · error · ValueError

If name is specified, tenant and database must also be…

Error message

If name is specified, tenant and database must also be specified in order to uniquely identify the collection

What it means

Validation in SqlSysDB.get_collections: a collection name alone is ambiguous across tenants/databases, so when name is provided, tenant and database must also be given to uniquely identify the collection. Fires when get_collections is called with name but tenant/database defaulting leaves the lookup ambiguous.

Solutions

  1. Pass both tenant and database along with the name
  2. Query by collection id instead of name if uniqueness is guaranteed
  3. Omit the name filter to list all collections in a tenant/database
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at chromadb/db/mixins/sysdb.py:468 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/e61bc4f2fc2219ce. Report an issue: GitHub.

Appendix: source

Thrown at chromadb/db/mixins/sysdb.py:468

                )

            return segments

    @trace_method("SqlSysDB.get_collections", OpenTelemetryGranularity.ALL)
    @override
    def get_collections(
        self,
        id: Optional[UUID] = None,
        name: Optional[str] = None,
        tenant: str = DEFAULT_TENANT,
        database: str = DEFAULT_DATABASE,
        limit: Optional[int] = None,
        offset: Optional[int] = None,
    ) -> Sequence[Collection]:
        """Get collections by name, embedding function and/or metadata"""

        if name is not None and (tenant is None or database is None):
            raise ValueError(
                "If name is specified, tenant and database must also be specified in order to uniquely identify the collection"
            )

        add_attributes_to_current_span(
            {
                "collection_id": str(id),
                "collection_name": name if name else "",
            }
        )

        collections_t = Table("collections")
        metadata_t = Table("collection_metadata")
        databases_t = Table("databases")
        q = (
            self.querybuilder()
            .from_(collections_t)
            .select(
                collections_t.id,

View on GitHub (pinned to aecdd12c8a)