Resolving SSL Certificate Issues in MongoDB Connection

Traceback (most recent call last):
File “e:\SI\Project\Python File\SPARTA\connect.py”, line 17, in
db.users.insert_one(doc)
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\collection.py”, line 669, in insert_one
self._insert_one(
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\collection.py”, line 609, in _insert_one
self.__database.client._retryable_write(acknowledged, _insert_command, session)
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\mongo_client.py”, line 1522, in _retryable_write
with self._tmp_session(session) as s:
File “C:\Users\Miranda Ratag\AppData\Local\Programs\Python\Python312\Lib\contextlib.py”, line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\mongo_client.py”, line 1840, in _tmp_session
s = self._ensure_session(session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\mongo_client.py”, line 1823, in _ensure_session
return self.__start_session(True, causal_consistency=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\mongo_client.py”, line 1766, in __start_session
self._topology._check_implicit_session_support()
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\topology.py”, line 573, in _check_implicit_session_support
self._check_session_support()
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\topology.py”, line 589, in _check_session_support
self._select_servers_loop(
File “E:\SI\Project\Python File\SPARTA\venv\Lib\site-packages\pymongo\topology.py”, line 259, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: ac-ze3lobj-shard-00-02.q2oca08.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
failed: unable to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms),ac-ze3uer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 30s, issuer certificate (_s Topology Description: <TopologyDescription id: 660282e291741b6687d2f351, topology_type: ReplicaSetNoPrimary, servers: [<Sengodb.net:27017: [SSL: rverDescription (‘ac-ze3lobj-shard-00-00.q2oca08.mongodb.net’, 27017) server_type: Unknown, rtt: None, error=AutoReconnect(outs: socketTimeoutMS: ‘ac-ze3lobj-shard-00-00.q2oca08.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to ge351, topology_type: Rept local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)’)>,rtt: None, error=AutoRe <ServerDescription (‘ac-ze3lobj-shard-00-01.q2oca08.mongodb.net’, 27017) server_type: Unknown, rtt: None, error=AutoReconnle to get local issuer ect('ac-ze3lobj-shard-00-01.q2oca08.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable ttion ('ac-ze3lobj-shardo get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)ngodb.net:27017: [SSL: ')>, <ServerDescription (‘ac-ze3lobj-shard-00-02.q2oca08.mongodb.net’, 27017) server_type: Unknown, rtt: None, error=AutoReouts: socketTimeoutMS: connect(‘ac-ze3lobj-shard-00-02.q2oca08.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unab_type: Unknown, rtt: Nole to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.ify failed: unable to g0ms)’)>]>