diff --git a/pymilvus/client/entity_helper.py b/pymilvus/client/entity_helper.py index d66324610..93ee07182 100644 --- a/pymilvus/client/entity_helper.py +++ b/pymilvus/client/entity_helper.py @@ -233,7 +233,7 @@ def convert_to_array(obj: List[Any], field_info: Any): field_data.string_data.data.extend(obj) return field_data raise ParamError( - message=f"UnSupported element type: {element_type} for Array field: {field_info.get('name')}" + message=f"Unsupported element type: {element_type} for Array field: {field_info.get('name')}" ) @@ -424,7 +424,7 @@ def pack_field_value_to_field_data( % (field_name, "array", type(field_value)) ) from e else: - raise ParamError(message=f"UnSupported data type: {field_type}") + raise ParamError(message=f"Unsupported data type: {field_type}") # TODO: refactor here. @@ -562,7 +562,7 @@ def entity_to_field_data(entity: Any, field_info: Any, num_rows: int): % (field_name, "sparse_float_vector", type(entity.get("values")[0])) ) from e else: - raise ParamError(message=f"UnSupported data type: {entity_type}") + raise ParamError(message=f"Unsupported data type: {entity_type}") return field_data diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index d315d23da..2655f1e28 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -536,7 +536,7 @@ def _prepare_batch_insert_request( if param and not isinstance(param, milvus_types.InsertRequest): raise ParamError(message="The value of key 'insert_param' is invalid") if not isinstance(entities, list): - raise ParamError(message="None entities, please provide valid entities.") + raise ParamError(message="'entities' must be a list, please provide valid entity data.") schema = kwargs.get("schema") if not schema: @@ -634,7 +634,7 @@ def _prepare_batch_upsert_request( if param and not isinstance(param, milvus_types.UpsertRequest): raise ParamError(message="The value of key 'upsert_param' is invalid") if not isinstance(entities, list): - raise ParamError(message="None entities, please provide valid entities.") + raise ParamError(message="'entities' must be a list, please provide valid entity data.") schema = kwargs.get("schema") if not schema: @@ -691,7 +691,7 @@ def _prepare_row_upsert_request( **kwargs, ): if not isinstance(rows, list): - raise ParamError(message="None rows, please provide valid row data.") + raise ParamError(message="'rows' must be a list, please provide valid row data.") fields_info, enable_dynamic = self._get_info(collection_name, timeout, **kwargs) return Prepare.row_upsert_param(