{"record":{"id":"cd23590a18abe62f","repo":"microsoft/semantic-kernel","slug":"unsupported-dtype-dtype-for-field-field-name","errorCode":null,"errorMessage":"Unsupported dtype '{dtype}' for field '{field.name}'. Supported dtypes: {', '.join(KIND_MAP.keys())}","messagePattern":"Unsupported dtype '(.+?)' for field '(.+?)'\\. Supported dtypes: (.+?)","errorType":"exception","errorClass":"VectorStoreOperationException","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/connectors/oracle.py","lineNumber":384,"sourceCode":"            if field.type_ == \"UUID\"\n        ]\n\n        # Validate key/data/vector field once per life-cycle\n        key_field = self.definition.key_field\n        key_field_name = key_field.storage_name or key_field.name\n        self._validate_identifiers(key_field_name)\n\n        for field in self.definition.data_fields:\n            data_field_name = field.storage_name or field.name\n            self._validate_identifiers(data_field_name)\n\n        for field in self.definition.vector_fields:\n            vector_field_name = field.storage_name or field.name\n            self._validate_identifiers(vector_field_name)\n\n            dtype = field.type_ or \"float32\"\n            if dtype not in KIND_MAP:\n                raise VectorStoreOperationException(\n                    f\"Unsupported dtype '{dtype}' for field '{field.name}'. \"\n                    f\"Supported dtypes: {', '.join(KIND_MAP.keys())}\"\n                )\n\n    @override\n    async def __aenter__(self) -> \"OracleCollection\":\n        return self\n\n    @override\n    async def __aexit__(self, *args: Any) -> None:\n        # Only close the connection pool if it was created by the collection itself.\n        if self.managed_client and self.connection_pool:\n            try:\n                await self.connection_pool.close()\n            except Exception as e:\n                logger.warning(\"Error closing Oracle connection pool: %s\", e)\n            finally:\n                self.connection_pool = None","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/connectors/oracle.py#L366-L402","documentation":"Thrown in OracleCollection.__init__ when a vector field's dtype (field.type_) is not one of the KIND_MAP keys: float32, float, float64, int8, uint8, binary. The default is float32 when type_ is unset, so this only fires for explicitly unsupported dtypes.","triggerScenarios":"Defining a vector field with type_='float16', type_='int32', type_='int64', or any string outside KIND_MAP. Fires at collection construction.","commonSituations":"Using an embedding/quantization output type the connector does not support; typo in the dtype string; mismatch between embedding model output and the connector's supported vector element types.","solutions":["Set the vector field type_ to one of: float32, float, float64, int8, uint8, binary","Match the dtype to your embedding model's output (almost always float32)","For binary embeddings use type_='binary' or 'uint8' as appropriate"],"exampleFix":"# before\nVectorStoreField(name='embedding', type_='float16', dimensions=768)  # raises 1511\n\n# after\nVectorStoreField(name='embedding', type_='float32', dimensions=768)  # default, safe","handlingStrategy":"type-guard","validationCode":"SUPPORTED_VECTOR_DTYPES = {'float32', 'float', 'float64', 'int8', 'uint8', 'binary'}\n\ndef valid_vector_dtype(dtype: str | None) -> bool:\n    return (dtype or 'float32') in SUPPORTED_VECTOR_DTYPES\n\nfor vf in definition.vector_fields:\n    if not valid_vector_dtype(vf.type_):\n        raise ValueError(f'Vector field {vf.name} has unsupported dtype {vf.type_}')","typeGuard":"SUPPORTED_VECTOR_DTYPES = {'float32', 'float', 'float64', 'int8', 'uint8', 'binary'}\n\ndef is_supported_vector_dtype(dtype: str | None) -> bool:\n    return isinstance(dtype, str) and dtype in SUPPORTED_VECTOR_DTYPES","tryCatchPattern":"from semantic_kernel.exceptions import VectorStoreOperationException\n\ntry:\n    collection = OracleCollection(record_type=MyModel, definition=definition)\nexcept VectorStoreOperationException as e:\n    if 'Unsupported dtype' in str(e):\n        # set the offending vector field type_ to 'float32'\n        ...","preventionTips":["Default vector fields to float32 (omit type_) unless you need int8/uint8/binary","Match the vector dtype to the embedding model's output type","Validate the definition's vector field types before constructing the collection"],"tags":["oracle","vector-store","validation","schema"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}