2
我的連接默認爲w = 0 ,但對於collection.update_one或collection.update_many,我希望通過設置參數來設置每個操作的write_concern W = 0。相反,我得到這個錯誤:如何使用pymongo的collection.update_one或update_many指定不安全/安全的寫入
update_one() got an unexpected keyword argument 'w'
什麼是正確的方法來做到這一點?我看到insert接受'w',但不接受update_one或update_many。爲什麼?
我也面臨着同樣的問題,並添加如果你想在update_one或update_many操作中明確指定write_concern,那麼這裏是pull請求https://github.com/mongodb/mongo-python-driver/pull/313 –