Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pymongo [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate

import certifi
import pymongo
conn = pymongo.MongoClient(
    'mongodb+srv://<username>:<password>@cluster0.eknio.mongodb.net/<dbName>?retryWrites=true&w=majority', tlsCAFile=certifi.where())
db = conn['<dbName>']
col = db.<collectionName>
array = list(col.find())

print(array)
 
PREVIOUS NEXT
Tagged: #pymongo #certificate #verify #unable #local #issuer #certificate
ADD COMMENT
Topic
Name
7+8 =