You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If assert is between function where I use ClientSession() -> this give error to me:
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f27f8585ac8>
transport: <_SelectorSocketTransport fd=38 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:2592)
Expected behaviour
No errors, I am using try..catch
Actual behaviour
Show me error message in console.
Steps to reproduce
importasynciofromaiohttpimportClientSession, ClientTimeoutasyncdeffun3(url):
try:
asyncwithClientSession(timeout=timeout) ass:
asyncwiths.get(url) asr:
ifr.status==200:
returnTrueelse:
returnFalseexcept:
returnFalseasyncdeffun1(session, url):
try:
asyncwithsession.get(url) asr:
# Make assert here, special. And error displayedassert'A77er1 9rr0r'inawaitr.text()
return [True, url]
except:
return [False, '']
asyncdeffun0(url):
url=urlif'http'inurlelse'http://'+url# If I remove this function - all goodifawaitfun3(url):
returnasyncwithClientSession(timeout=timeout) ass:
temp=awaitfun1(s, url)
iftemp[0]:
print('Good')
asyncdefmain():
tasks= []
# I have many items, just add to simulate real behaviortask=asyncio.create_task(
fun0(
'https://python.org'
)
)
tasks.append(task)
awaitasyncio.gather(*tasks)
if__name__=="__main__":
timeout=ClientTimeout(total=10)
asyncio.run(main())
Your environment
Ubuntu 18.04
Python 3.7.1
GCC 8.2.0
asyncio v3.4.3
aiohttp v3.5.1
The text was updated successfully, but these errors were encountered:
GitMate.io thinks the contributor most likely able to help you is @asvetlov.
Possibly related issues are #3477 ("Application data after close notify" regression in 3.5.0 with SSL connection), #2497 (ClientSession keep transferring data after closed), #3052 (SSL with closed connections), #370 (Server closes connection before sending data), and #1907 (aiohttp 2.x closing client request data stream).
Long story short
If assert is between function where I use ClientSession() -> this give error to me:
Expected behaviour
No errors, I am using try..catch
Actual behaviour
Show me error message in console.
Steps to reproduce
Your environment
Ubuntu 18.04
Python 3.7.1
GCC 8.2.0
asyncio v3.4.3
aiohttp v3.5.1
The text was updated successfully, but these errors were encountered: