If the document is missing an _id field one will be added.会自动添加_id字段 不知何故,这似乎是错误的,因为它们中的一些具有相同的价值。在我看来,在pymongo的700k文档'E11000 duplicate key error collection: database.collection index: _id_dup <e
我试图将一些测试数据插入到集合中,数据本身包含我已经创建的_id值。下面是一个小的数据和代码示例,当我使用插入() pymongo命令将数据和代码写入集合时
def database_Insertions(data): #data is the list of dictionaries当我试图运行这个程序时,我得到了一个"BulkWriteError",当我用一个Try /Catch分解错误消息时,我得到了.duplicate key error colle