TypeError: ‘Collection’ object is not callable. If you meant to call the ‘insert’ method on a ‘Collection’ object it is failing because no such method exists. 先检查自己的数据中是否有空的。或者空行,有的话进行修改,直到没有空数据再将self.collection.insert改为self.collection.insert_one。 2.这个通常是版本问题,如果你的版本使用insert会报错,那改成insert_one就可以了