diff --git a/pymilvus/client/entity_helper.py b/pymilvus/client/entity_helper.py index 3e808d2a0..d66324610 100644 --- a/pymilvus/client/entity_helper.py +++ b/pymilvus/client/entity_helper.py @@ -46,6 +46,8 @@ def is_float_type(v: Any): for item in entity: if SciPyHelper.is_scipy_sparse(item): return item.shape[0] == 1 + if not isinstance(item, dict) and not isinstance(item, list): + return False pairs = item.items() if isinstance(item, dict) else item # each row must be a list of Tuple[int, float]. we allow empty sparse row for pair in pairs: