Hi I have already created collections but when I try to insert add object it says class already exist why so?
my code
collection_name = f"Collection_{request.collectionId.replace('-', '')}"
data_row = {
"filename": request.id,
"filecontent": request.text,
}
print(f"Passing file : {request.id}")
collection = client.collections.get(collection_name)
with collection.batch.dynamic() as batch:
batch.add_object(properties=data_row)
if len(collection.batch.failed_objects) > 0:
print(f"Failed to add objects: {collection.batch.failed_objects}")
return {
"status": "error",
"message": f"Failed to add objects: {collection.batch.failed_objects}",
}
error I am having
âmessageâ: âFailed to add objects: [ErrorObject(message=âWeaviateInsertManyAllFailedError(\âEvery object failed during insertion. Here is the set of all errors: class already exists: found similar class "Collection_83cdb7b2569a428095e38b73e8348168"\â)â, object_=_BatchObject(collection=âCollection_83CDB7B2569A428095E38B73E8348168â, vector=None, uuid=âdbcf23f4-bdbc-46b1-bc2f-5398eaf75dd4â, properties={âfilenameâ: âB7139300-9CC7-45F0-8096-weâ, âfilecontentâ: âSaasdfadfs 234 234iddrsdf asdfade!â}, tenant=None, references=None, index=0, retry_count=0), original_uuid=None)]â