
ServerSelectionTimeoutError 가 발생하여
https://teamsparta.notion.site/3-93abb2b1163f4cda947279f621578e85 링크를 참조해서 certifi 패키지 받고 코드 작성 하였습니다.
그래도 error가 발생해서,
위 링크 참조해서 pymongo 4.3.3 버전받고 실행시켜 봤습니다.
그랬더니 OperationFailure error 가 발생하고 authentication 실패했다고 나옵니다

작성한 코드 및 에러 메세지
Traceback (most recent call last):
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/dbprac.py", line 13, in <module>
db.users.insert_one(doc)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/collection.py", line 628, in insert_one
self._insert_one(
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/collection.py", line 569, in _insert_one
self.__database.client._retryable_write(acknowledged, _insert_command, session)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1476, in _retryable_write
return self._retry_with_session(retryable, func, s, None)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1349, in _retry_with_session
return self._retry_internal(retryable, func, session, bulk)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/_csot.py", line 105, in csot_wrapper
return func(self, *args, **kwargs)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1381, in _retry_internal
with self._get_socket(server, session) as sock_info:
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1217, in _get_socket
with server.get_socket(handler=err_handler) as sock_info:
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/pool.py", line 1407, in get_socket
sock_info = self._get_socket(handler=handler)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/pool.py", line 1520, in _get_socket
sock_info = self.connect(handler=handler)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/pool.py", line 1378, in connect
sock_info.authenticate()
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/pool.py", line 870, in authenticate
auth.authenticate(creds, self)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/auth.py", line 549, in authenticate
auth_func(credentials, sock_info)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/auth.py", line 475, in _authenticate_default
return _authenticate_scram(credentials, sock_info, "SCRAM-SHA-1")
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/auth.py", line 241, in _authenticate_scram
res = sock_info.command(source, cmd)
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/pool.py", line 767, in command
return command(
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/network.py", line 166, in command
helpers._check_command_response(
File "/Users/kimkwang-il/Workspace/InnovationCamp/WebComprehensiveClass/pythonprac/venv/lib/python3.8/site-packages/pymongo/helpers.py", line 181, in _check_command_response
raise OperationFailure(errmsg, code, response, max_wire_version)
pymongo.errors.OperationFailure: bad auth : authentication failed, full error: {'ok': 0, 'errmsg': 'bad auth : authentication failed', 'code': 8000, 'codeName': 'AtlasError'}
