커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
mongoDB 오류
undefined주차
북마크
노*지
댓글
1
추천
0
조회수
23
조회수
23
답변 완료

pymongo.errors.ServerSelectionTimeoutError: ac-kyxexok-shard-00-01.dehdolu.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108),ac-kyxexok-shard-00-00.dehdolu.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108),ac-kyxexok-shard-00-02.dehdolu.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108), Timeout: 30s, Topology Description: <TopologyDescription id: 62e875c9cb4ce082abe88a46, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('ac-kyxexok-shard-00-00.dehdolu.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('ac-kyxexok-shard-00-00.dehdolu.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')>, <ServerDescription ('ac-kyxexok-shard-00-01.dehdolu.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('ac-kyxexok-shard-00-01.dehdolu.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')>, <ServerDescription ('ac-kyxexok-shard-00-02.dehdolu.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('ac-kyxexok-shard-00-02.dehdolu.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')>]>

스파르타 즉문즉답


@app.route('/sign_up/save', methods=['POST'])

def sign_up():

  # 회원가입

  username_receive = request.form['username_give']

  password_receive = request.form['password_give']

  password_hash = hashlib.sha256(password_receive.encode('utf-8')).hexdigest()

  # DB에 저장

  return jsonify({'result': 'success'})


이 부분을


@app.route('/sign_up/save', methods=['POST'])

def sign_up():

  username_receive = request.form['username_give']

  password_receive = request.form['password_give']

  password_hash = hashlib.sha256(password_receive.encode('utf-8')).hexdigest()

  doc = {

    "username": username_receive,                # 아이디

    "password": password_hash,                 # 비밀번호

    "profile_name": username_receive,              # 프로필 이름 기본값은 아이디

    "profile_pic": "",                     # 프로필 사진 파일 이름

    "profile_pic_real": "profile_pics/profile_placeholder.png", # 프로필 사진 기본 이미지

    "profile_info": ""                     # 프로필 한 마디

  }

  db.users.insert_one(doc)

  return jsonify({'result': 'success'})


도큐먼트를 주면 파이몽고 에러가 뜹니다. 어제부터 몽고디비를 강의 다시 보면서 회원가입을 했지만 여전히 데이터가 들어오고 있지 않습니다.

무엇이 문제일까요?

취소
 공유
취소
댓글 0
댓글 알림
나의얼굴