aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host github.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')]
/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/bin/python /Users/sureshkl/PycharmProjects/Learn_aiohttp/example/app.py
/Users/sureshkl/PycharmProjects/Learn_aiohttp/example/app.py:160: DeprecationWarning: Application.make_handler(...) is deprecated, use AppRunner API instead
f = loop.create_server(app.make_handler(), '127.0.0.1', 5000)
serving on ('127.0.0.1', 5000)
SSL handshake failed on verifying the certificate
protocol: <asyncio.sslproto.SSLProtocol object at 0x1037fd208>
transport: <_SelectorSocketTransport fd=11 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x1037fd208>
transport: <_SelectorSocketTransport closing fd=11 read=idle write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
Error handling request
Traceback (most recent call last):
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 986, in create_connection
ssl_handshake_timeout=ssl_handshake_timeout)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 1014, in _create_connection_transport
await waiter
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/example/app.py", line 133, in oauth
_, meta = await client.get_access_token(request.query)
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aioauth_client.py", line 340, in get_access_token
data = await self.request('POST', self.access_token_url, data=payload, loop=loop)
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aioauth_client.py", line 152, in _request
async with session.request(method, url, **kwargs) as response:
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
raise last_exc
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/Users/sureshkl/PycharmProjects/Learn_aiohttp/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 939, in _wrap_create_connection
req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host github.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')]