pymongo.errors.ServerSelectionTimeoutError: mflix-shard-00-00.fmraf.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129),mflix-shard-00-02.fmraf.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129),mflix-shard-00-01.fmraf.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129), Timeout: 30s, Topology Description: <TopologyDescription id: 60b1c9b0c4a5874ea362693e, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('mflix-shard-00-00.fmraf.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('mflix-shard-00-00.fmraf.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')>, <ServerDescription ('mflix-shard-00-01.fmraf.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('mflix-shard-00-01.fmraf.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')>, <ServerDescription ('mflix-shard-00-02.fmraf.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('mflix-shard-00-02.fmraf.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')>]>
This is the error it is producing.
I am using FastApi, Motor, and uvicorn to the run server. The database I use is a free cluster provided in Mongo Atlas. It was working fine the last time I updated the server that is 2 days ago, but from yesterday onwards the error is produced. I've tried to update the above mentioned packages as of now.
I am new to mongodb.
I have found a fix that works but I don't if its the best way.
The above line is how I connected to my cluster. I changed the line to:
It works as it did earlier there is no issue.
Anyway I would like to know why this error occurs!