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)]”