{"record":{"id":"a77ff68d59621e55","repo":"chroma-core/chroma","slug":"field-name-must-be-a-string-got-type-field-na","errorCode":null,"errorMessage":"Field name must be a string, got {type(field).__name__}","messagePattern":"Field name must be a string, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"chromadb/execution/expression/operator.py","lineNumber":146,"sourceCode":"            conditions = [Where.from_dict(c) for c in data[\"$or\"]]\n            if len(conditions) == 1:\n                return conditions[0]\n            result = conditions[0]\n            for c in conditions[1:]:\n                result = result | c\n            return result\n\n        else:\n            # Single field condition\n            if len(data) != 1:\n                raise ValueError(\n                    f\"Where dict must contain exactly one field, got {len(data)}\"\n                )\n\n            field, condition = next(iter(data.items()))\n\n            if not isinstance(field, str):\n                raise TypeError(\n                    f\"Field name must be a string, got {type(field).__name__}\"\n                )\n\n            if isinstance(condition, dict):\n                # Operator-based condition\n                if not condition:\n                    raise ValueError(\n                        f\"Operator dict for field '{field}' cannot be empty\"\n                    )\n                if len(condition) != 1:\n                    raise ValueError(\n                        f\"Operator dict for field '{field}' must contain exactly one operator\"\n                    )\n\n                op, value = next(iter(condition.items()))\n\n                if op == \"$eq\":\n                    return Key(field) == value","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/execution/expression/operator.py#L128-L164","documentation":"Error \"Field name must be a string, got {type(field).__name__}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/execution/expression/operator.py:146 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"}