-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
I'm running this code:
import aiohttp
import asyncio
async def main():
async with aiohttp.ClientSession() as sess:
async with sess.get('https://api.scryfall.com/cards/random') as resp:
print(await resp.json())
asyncio.run(main())
With aiohttp 3.5.1 on Arch Linux testing (Python 3.7.2, OpenSSL 1.1.1a).
The request to the same URL goes through correctly with curl, and sometimes (very rarely) with aiohttp, but most of the time aiohttp returns None
and produces the following error:
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x7fa5894fc080>
transport: <_SelectorSocketTransport fd=6 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/usr/lib/python3.7/asyncio/sslproto.py", line 207, in feed_ssldata
self._sslobj.unwrap()
File "/usr/lib/python3.7/ssl.py", line 767, in unwrap
return self._sslobj.shutdown()
ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2605)
Edit: this is a regression between 3.4.4 and 3.5.0