我试图在mongodb中插入一个带点的键,但是它不起作用
def mongo(self,product_dict):
myclient = pymongo.MongoClient("mongodb://localhost:27017/")
mydb = myclient["toys_db"]
mycol = mydb["toys3"]
mydict = product_dict
print "First : ",mydict
for i in xrange(1):
mydict['i'] = i
mydict['_id'] = ObjectId()
mycol.insert_one(mydict , check_keys= False)
错误:
insert_one()获得了意外的关键字参数'check_keys'