반응형
Notice
Recent Posts
Recent Comments
Link
코딩일상
[TIL]몽고 db 연결 오류 해결법(항해 99) pymongo.errors.ServerSelectionTimeoutError: ~ [SSL: CERTIFICATE_VERIFY_FAILED]~ 본문
기록/Troubleshooting
[TIL]몽고 db 연결 오류 해결법(항해 99) pymongo.errors.ServerSelectionTimeoutError: ~ [SSL: CERTIFICATE_VERIFY_FAILED]~
solutionMan 2022. 6. 28. 08:29반응형
파이참 패키지에서 certifi를 설치한다
아래와 같이 빨간 부분을 추가한다.
import certifi
ca = certifi.where()
client = MongoClient('mongodb+srv://test:sparta@cluster0.내주소.mongodb.net/내DB명?retryWrites=true&w=majority', tlsCAFile=ca)
물론 주소는 각자의 것으로
from pymongo import MongoClient
import certifi///////
ca = certifi.where()//////
client = MongoClient('mongodb+srv://test:sparta@cluster0.내주소.mongodb.net/내DB명?retryWrites=true&w=majority', tlsCAFile=ca)
db = client.dbsparta
doc = {
'name':'bob',
'age':27
}
db.users.insert_one(doc)
진짜 고생해서... 다른분들은 고민이 없으시길.. ㅜ
반응형
'기록 > Troubleshooting' 카테고리의 다른 글
[오류 해결] CastError: Cast to ObjectId failed for value "값" at path "_id" for model "모델명" (0) | 2022.08.02 |
---|---|
PM2 stop/ kill 하는법 (0) | 2022.07.26 |
코드 오류[Function: getDay] (0) | 2022.07.16 |
오류해결 Indicate whether to send a cookie in a cross-site request by specifying its SameSit(로그아웃 쿠키 제거) (0) | 2022.07.13 |
mac에서 home brew 에러 발생시 (zsh: command not found: brew)(22.07.08) (0) | 2022.07.08 |
Comments