DeprecationWarning: count is deprecated. Use Collection.count_documents instead.

提示count方法已经过时了,虽然能查出结果,但是受不了看见报错

改成如下它推荐的方法就可以了

count = mycollection.count_documents({"contentId": contentId})

猜你喜欢

转载自blog.csdn.net/weixin_37560085/article/details/89002354
今日推荐