I am trying to run a python code to update a collection with arrays. The below statement give error wtih pymongo . Please guide
db.students.update({}, {'$set': {"grades.$[element]": 100}}, {'multi': true, 'arrayFilters': [{"element": { '$gte': 100}}]} )
tried : multi=True tried : multi:True
I am getting the below error : common.validate_boolean("upsert", upsert) File "F:\Program Files\Python3.7\lib\site-packages\pymongo\common.py", line 159, in validate_boolean raise TypeError("%s must be True or False" % (option,))
TypeError: upsert must be True or False