当前位置:网站首页>TypeError: ‘Collection‘ object is not callable. If you meant to call the ......
TypeError: ‘Collection‘ object is not callable. If you meant to call the ......
2022-04-23 04:54:00 【黄佳俊、】
TypeError: 'Collection' object is not callable. If you meant to call the 'update' method on a 'Collection' object it is failing because no such method exists.
报错原因:
pymongo4.0.1 发生了很大的改变,pymongo 4.0.1里不包含'Collection' object。
解决方法一:(我实验的时候,没能成功下载到低版本的pymongo)
(1)卸载pymongo 4.0.1
C:\Users\nx>pip uninstall pymongo
(2)安装pymongo-3.5.1
C:\Users\nx>pip install pymongo==3.5.1
解决方法二:
把不能调用的函数改换成pymongo4.0.1中功能类似的函数或者自己实现那个函数功能。
版权声明
本文为[黄佳俊、]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_48419914/article/details/124315182
边栏推荐
- Leetcode006 -- find the longest common prefix in the string array
- JS generates a specified number of characters according to some words
- MySQL time function query
- [2021] Spatio-Temporal Graph Contrastive Learning
- Leetcode -- heuristic search
- Excel uses the functions of replacement, sorting and filling to comprehensively sort out financial data
- Innovation training (IV) preliminary preparation - server
- Differences between redis and MySQL
- PHP counts the number of files in the specified folder
- Druid -- JDBC tool class case
猜你喜欢
使用model.load_state_dict()时,出现AttributeError: ‘str‘ object has no attribute ‘copy‘
PHP+MySQL 制作留言板
Record the ThreadPoolExecutor main thread waiting for sub threads
Sword finger offer: the path with a certain value in the binary tree (backtracking)
【数据库】MySQL单表查询
[2021] Spatio-Temporal Graph Contrastive Learning
简单的拖拽物体到物品栏
Simply drag objects to the item bar
泰克示波器DPO3054自校准SPC失败维修
View, modify and delete [database] table
随机推荐
QPushbutton 槽函数被多次触发
PHP+MySQL 制作留言板
Learning Android from scratch -- Introduction
MySQL - data read / write separation, multi instance
View, modify and delete [database] table
用LCR表完美测试无线充电系统中的线圈
跨境电商 | Facebook 和 Instagram:哪个社交媒体更适合你?
Record the ThreadPoolExecutor main thread waiting for sub threads
Open the past and let's start over.
View analysis of scenic spots in ArcGIS
The unity camera rotates with the mouse
redis和mysql区别
信息学奥赛一本通 1212:LETTERS | OpenJudge 2.5 156:LETTERS
负载均衡简介
Knowledge points sorting: ES6
Leetcode004 -- Roman numeral to integer
AQS source code reading
The object needs to add additional attributes. There is no need to add attributes in the entity. The required information is returned
使用model.load_state_dict()时,出现AttributeError: ‘str‘ object has no attribute ‘copy‘
CLion+OpenCV identify ID number - detect ID number