pymongo.errors.ServerSelectionTimeoutError

今天使用pymongo连接mongo数据库报错
pymongo.errors.ServerSelectionTimeoutError: ip:端口: timed out,
Timeout: 30s, Topology Description: <TopologyDescription id: 6225f80d6cb79959bb946c57,
topology_type: Single, servers: [<ServerDescription ('ip', 端口) server_type: Unknown,
rtt: None, error=NetworkTimeout('ip:端口: timed out')>]>

原来是因为网络不通(公司内网访问需要开通),开通网络关系即可访问。

posted @ 2022-08-17 21:52  漫途测开  阅读(952)  评论(0编辑  收藏  举报