raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: No replica set members available for replica set name "None", Timeout: 30s, Topology Description: <TopologyDescription id: 6215e06aa0ff1c7437099f3e, topology_type: ReplicaSetNoPrimary, servers: []>
Python从3.7升级到3.8后, 更新了三方库. 在连接数据库时候出现了问题.
网上说的 connect=False, 以及进程开启前time.sleep 都不行.
后来和同事对比发现, 自己的pymongo为4.0, 他的为3.12, 随之降级: pip install pymongo==3.12, 再运行就好了.
此bug已提交开发者社区, 等待回复