I’m using Milvus 2.4.1 on Docker desktop and Python 3.11.7 on Windows. I want to add data to Milvus but I get the following Exception:
<DataNotMatchException: (code=1, message=The data don't match with schema fields, expect 2 list, got 3)>
I don’t understand it, because the collection contains 3 fields but only 2 fields are expected.
Following is more detailed information. Thanks in advance!
Dataframe:
pk architecture vector
0 1 Architecture1 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1 2 Architecture2 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
Collection: <Collection>:
-------------
<name>: Architecture
<description>: Collection for Architecture
<schema>: {'auto_id': True, 'description': 'Collection for Architecture', 'fields': [{'name': 'pk', 'description': '', 'type': <DataType.INT64: 5>, 'is_primary': True, 'auto_id': True}, {'name': 'architecture', 'description': '', 'type': <DataType.VARCHAR: 21>, 'params': {'max_length': 20}}, {'name': 'vector', 'description': '', 'type': <DataType.FLOAT_VECTOR: 101>, 'params': {'dim': 128}}], 'enable_dynamic_field': False}
Field names: ['pk', 'architecture', 'vector']
New contributor
Reina Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.