Python SSL 인증서 오류
답변함문제 발생 환경
운영 체제(필수)
예: Window 11, iOS 17, 안드로이드 14
macOS 26.1
앱 버전(필수)
예: 1.19.222 (265)
1.7.20
브라우저 및 버전
웹 관련 오류의 경우, 사용 중인 브라우저와 버전을 입력해주세요.
브라우저는 해당 이슈와 관련 없음
Python 3.14.0
인터넷 연결 상태 및 통신사
예: 유선(LG), Wi-Fi(KT), LTE(SK), 핫스팟 등
KT LTE 핫스팟, KT 무선공유기, Iptime공유기에서 모두 같은 문제 발생
문제 발생 시간
오류 발생 시간
오류가 발생한 정확한 날짜와 시간을 입력해주세요.
문제 상세 설명
문제 상황 설명
오류가 발생한 상황과 증상을 자세히 기술해주세요.
Python aiohttp 사용중 SSL 관련 오류가 발생하였습니다. 유니콘 Pro 활성화 시에 해당 오류가 발생하며 비활성화 후 재시도시 정상적으로 작동합니다.
오류 메시지
화면에 표시된 오류 메시지의 정확한 내용을 입력해주세요.
Traceback (most recent call last):
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/connector.py", line 1283, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/base_events.py", line 1198, in create_connection
transport, protocol = await self._create_connection_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
ssl_shutdown_timeout=ssl_shutdown_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/base_events.py", line 1231, in _create_connection_transport
await waiter
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/sslproto.py", line 581, in _on_handshake_complete
raise handshake_exc
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/sslproto.py", line 563, in _do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ssl.py", line 951, in do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
"__main__", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/runpy.py", line 88, in _run_code
exec(code, run_globals)
~~~~^^^^^^^^^^^^^^^^^^^
File "/Users/admin/.vscode/extensions/ms-python.debugpy-2025.14.1-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 71, in <module>
cli.main()
~~~~~~~~^^
File "/Users/admin/.vscode/extensions/ms-python.debugpy-2025.14.1-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 508, in main
run()
~~~^^
File "/Users/admin/.vscode/extensions/ms-python.debugpy-2025.14.1-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 358, in run_file
runpy.run_path(target, run_name="__main__")
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/.vscode/extensions/ms-python.debugpy-2025.14.1-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310, in run_path
return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
File "/Users/admin/.vscode/extensions/ms-python.debugpy-2025.14.1-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127, in _run_module_code
_run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/.vscode/extensions/ms-python.debugpy-2025.14.1-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118, in _run_code
exec(code, run_globals)
~~~~^^^^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/src/index.py", line 8, in <module>
bot.run(TOKEN)
~~~~~~~^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/discord/client.py", line 929, in run
asyncio.run(runner())
~~~~~~~~~~~^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/runners.py", line 204, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/runners.py", line 127, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/discord/client.py", line 918, in runner
await self.start(token, reconnect=reconnect)
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/discord/client.py", line 846, in start
await self.login(token)
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/discord/client.py", line 677, in login
self._application = await self.application_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/discord/client.py", line 2596, in application_info
data = await self.http.application_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/discord/http.py", line 654, in request
async with self.__session.request(method, url, **kwargs) as response:
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/client.py", line 1510, in __aenter__
self._resp: _RetType = await self._coro
^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/client.py", line 779, in _request
resp = await handler(req)
^^^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/client.py", line 734, in _connect_and_send_request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
req, traces=traces, timeout=real_timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/connector.py", line 642, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/connector.py", line 1209, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/connector.py", line 1581, in _create_direct_connection
raise last_exc
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/connector.py", line 1550, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/Users/admin/Documents/azura-bot/venv/lib/python3.14/site-packages/aiohttp/connector.py", line 1285, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)')]
발생 상황
오류가 발생하기 직전에 수행한 작업과 상황을 자세히 설명해주세요.
재현 방법
오류를 재현할 수 있는 단계별 방법을 상세히 설명해주세요.
1.
2.
3.
스크린샷 또는 동영상
가능한 경우, 오류 화면의 스크린샷이나 동영상을 첨부해주세요.
기타 추가 정보
영향을 받는 범위
오류가 어느 정도의 영향을 미치는지 설명해주세요.
python aiohttp, requests 모듈, 간헐적으로 npm 사용시에도 SSL 관련 오류 발생
임시 해결 방안
임시로 사용할 수 있는 해결 방안이 있는 경우, 해당 방안을 설명해주세요.
보호를 비활성화 하고 실행합니다
기타 참고사항
기타 오류와 관련된 추가 정보를 제공해주세요.
-
샘플코드와 보호 활성화, 비활성화 출력도 같이 첨부하겠습니다.
```python
import requests
import tracebackurl = "https://naver.com"
try:
response = requests.get(url, timeout=5)
print("Status Code:", response.status_code)
print("Response Headers:", response.headers)
except Exception:
print("An exception occurred:")
traceback.print_exc()```
Unicorn Pro 활성화시 출력:
```
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/connectionpool.py", line 464, in _make_request
self._validate_conn(conn)
~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/connectionpool.py", line 1093, in _validate_conn
conn.connect()
~~~~~~~~~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/connection.py", line 790, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
sock=sock,
...<14 lines>...
assert_fingerprint=self.assert_fingerprint,
)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/connection.py", line 969, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
sock=sock,
...<8 lines>...
tls_in_tls=tls_in_tls,
)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/util/ssl_.py", line 480, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/util/ssl_.py", line 524, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ssl.py", line 455, in wrap_socket
return self.sslsocket_class._create(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
sock=sock,
^^^^^^^^^^
...<5 lines>...
session=session
^^^^^^^^^^^^^^^
)
^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ssl.py", line 1076, in _create
self.do_handshake()
~~~~~~~~~~~~~~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ssl.py", line 1372, in do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/connectionpool.py", line 787, in urlopen
response = self._make_request(
conn,
...<10 lines>...
**response_kw,
)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/connectionpool.py", line 488, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/requests/adapters.py", line 644, in send
resp = conn.urlopen(
method=request.method,
...<9 lines>...
chunked=chunked,
)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/connectionpool.py", line 841, in urlopen
retries = retries.increment(
method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/urllib3/util/retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='naver.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)')))During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/admin/Desktop/test.py", line 7, in <module>
response = requests.get(url, timeout=5)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/requests/adapters.py", line 675, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='naver.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)')))```
비활성화 시 출력:
```
Status Code: 200
Response Headers: {'Date': 'Wed, 05 Nov 2025 14:16:40 GMT', 'content-type': 'text/html; charset=UTF-8', 'transfer-encoding': 'chunked', 'set-cookie': 'PM_CK_loc=4d56ea0bcd5ebb74eeff81db19f8e1e1f78bc93eb6657ed553f86b89931103d3; Expires=Thu, 06 Nov 2025 14:16:40 GMT; Path=/; HttpOnly', 'cache-control': 'no-cache, no-store, must-revalidate', 'pragma': 'no-cache', 'x-frame-options': 'DENY', 'x-xss-protection': '1; mode=block', 'content-encoding': 'gzip', 'strict-transport-security': 'max-age=63072000; includeSubdomains', 'referrer-policy': 'unsafe-url', 'server': 'nfront'}```
0 -
안녕하세요. 유니콘 고객센터입니다.
아래 항목들 확인 부탁드립니다.1. 테스트할 때 VSCode의 Run/Debug 기능을 사용하셨나요, 아니면 터미널에서 직접
python test.py명령어로 실행하셨나요?
2. 유니콘 Pro -> 유니콘 설정 -> 앱 관리에 별도로 추가하신 앱이 있으실까요?
3. 유니콘 외 VPN, 네트워크 관련 프로그램, 광고 차단 앱, 보안 프로그램 사용중이신게 있으실까요?0 -
1. VSCode Run/Debug, python test.py 모두 같은 오류 발생합니다.
2, 3. 없습니다
0 -
Status Code: 200
Response Headers: {'Date': 'Wed, 19 Nov 2025 03:49:58 GMT', 'content-type': 'text/html; charset=UTF-8', 'transfer-encoding': 'chunked', 'set-cookie': 'PM_CK_loc=e99c90a66c60a60c8e7e4c7a8a7c26a6a6e02ed124d859cd948af9dc187d63a6; Expires=Thu, 20 Nov 2025 03:49:58 GMT; Path=/; HttpOnly', 'cache-control': 'no-cache, no-store, must-revalidate', 'pragma': 'no-cache', 'x-frame-options': 'DENY', 'x-xss-protection': '1; mode=block', 'content-encoding': 'gzip', 'strict-transport-security': 'max-age=63072000; includeSubdomains', 'referrer-policy': 'unsafe-url', 'server': 'nfront'}동일하게 코드를 작성해서 vscode 내 터미널로 실행했을 때 정상적으로 결과가 출력이 되고 있어서 증상 확인에 어려움이 있습니다.
고객님께서 문의하신 내용에 대해 정확한 진단과 문제 해결을 위해 원격 지원이 필요할 것으로 보입니다.
아래 절차에 따라 상담 요청 메시지를 남겨주시면, 실시간 상담 및 원격 지원으로 신속하게 증상을 확인하고 해결을 도와드리겠습니다.
1. 유니콘 홈페이지에 접속합니다.
2. 우측 하단의 상담 버튼(물음표 아이콘)을 클릭합니다.
3. '문의하기'를 선택한 후, '상담사 연결'을 클릭합니다.
4. '오작동 문의'를 선택합니다.
5. 사용 중이신 제품 및 OS를 선택한 후, 문제 유형을 선택합니다.
6. 마지막으로 증상 내용을 상세하게 설명해 주시면 됩니다.감사합니다.
유니콘 고객센터0