weaviate-python-client icon indicating copy to clipboard operation
weaviate-python-client copied to clipboard

Unable to combine uuids with strings in DataObject arrays

Open trengrj opened this issue 1 year ago • 0 comments

I expect a string "06bd10e6-e8c2-4277-b534-54583348669e" in a text[] will index ok but get the following error:

import weaviate
import weaviate.classes as wc
from weaviate.collections.classes.data import DataObject

client = weaviate.connect_to_local(
    port=8080,
    grpc_port=50051,
)

client.collections.delete(name="Test")
collection = client.collections.create(name="Test")


collection.data.insert_many([
    DataObject(properties={"name": ["test", "06bd10e6-e8c2-4277-b534-54583348669e"]}),
])

Produces error

WeaviateInsertManyAllFailedError: Every object failed during insertion.
Here is the set of all errors: property 'name' on class 'Test': element [1]: mismatched data type - 'text' expected, got 'uuid'

trengrj avatar Apr 08 '24 06:04 trengrj