mongoDB atlas closed connection issues with python

am trying to connect from my mac cli to my mongoDB atlas database, but am getting this error

connection closed,connection closed,connection closed, Timeout: 30s, Topology Description: <TopologyDescription id: 647a0c3783a182a64dd114d9, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('ac-qy1zdz6-shard-00-00.obm5tsb.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('connection closed')>, <ServerDescription ('ac-qy1zdz6-shard-00-01.obm5tsb.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('connection closed')>, <ServerDescription ('ac-qy1zdz6-shard-00-02.obm5tsb.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('connection closed')>]>