Aiohttp - Running Client Example "runtimeerror: Ssl Is Not Supported"
I'm just trying to go through the aiohttp examples but I get the error with the first one: import aiohttp import asyncio async def fetch(session, url): async with session.get(
Solution 1:
Aiohttp imports ssl
as follows:
try:
import ssl
SSLContext = ssl.SSLContext
except ImportError: # pragma: no cover
ssl = None# type: ignore
SSLContext = object# type: ignore
If then it is still None
, it rises error specified in your post. Thus, first of all try to import ssl
manually. It should look somewhat like that:
>>> import ssl
>>> ssl
<module 'ssl'from'/usr/lib/python3.6/ssl.py'>
If it does not, then check/reinstall your python setup.
Post a Comment for "Aiohttp - Running Client Example "runtimeerror: Ssl Is Not Supported""