{"record":{"id":"4d9a9edc50b895ac","repo":"chroma-core/chroma","slug":"expected-sparsevector-indices-to-be-a-list-got-t","errorCode":null,"errorMessage":"Expected SparseVector indices to be a list, got {type(self.indices).__name__}","messagePattern":"Expected SparseVector indices to be a list, got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/base_types.py","lineNumber":35,"sourceCode":"        indices: List of dimension indices (must be non-negative integers, sorted in strictly ascending order)\n        values: List of values corresponding to each index (floats)\n        labels: Optional list of string labels corresponding to each index\n\n    Note:\n        - Indices must be sorted in strictly ascending order (no duplicates)\n        - Indices and values must have the same length\n        - If labels is provided, it must have the same length as indices and values\n        - All validations are performed in __post_init__\n    \"\"\"\n\n    indices: List[int]\n    values: List[float]\n    labels: Optional[List[str]] = None\n\n    def __post_init__(self) -> None:\n        \"\"\"Validate sparse vector structure.\"\"\"\n        if not isinstance(self.indices, list):\n            raise ValueError(\n                f\"Expected SparseVector indices to be a list, got {type(self.indices).__name__}\"\n            )\n\n        if not isinstance(self.values, list):\n            raise ValueError(\n                f\"Expected SparseVector values to be a list, got {type(self.values).__name__}\"\n            )\n\n        if len(self.indices) != len(self.values):\n            raise ValueError(\n                f\"SparseVector indices and values must have the same length, \"\n                f\"got {len(self.indices)} indices and {len(self.values)} values\"\n            )\n\n        if self.labels is not None:\n            if not isinstance(self.labels, list):\n                raise ValueError(\n                    f\"Expected SparseVector labels to be a list, got {type(self.labels).__name__}\"","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/base_types.py#L17-L53","documentation":"Error \"Expected SparseVector indices to be a list, got {type(self.indices).__name__}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/base_types.py:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}