Asn1 parsing error when trying to connect to mongo atlas 1

Asn1 parsing error when trying to connect to mongo atlas

import ssl
import pymongo
client = pymongo.MongoClient("mongodb+srv://FirstMgDb:xxxxxx@cluster0.qvj5g.mongodb.net/Cluster0?retryWrites=true&w=majority",ssl_cert_reqs=ssl.CERT_NONE)

Here is what the above code is Doing:
1. We’re importing the pymongo library.
2. We’re creating a client instance of MongoClient.
3. We’re passing the MongoDB URI to the client.
4. We’re passing the ssl_cert_reqs argument to the client.

Similar Posts