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
aiohttp seems to close files after the request is over, meaning a file object cannot be reused once a request is sent.
Expected behaviour
The file should not be closed and I can reuse my file objects following a seek call.
Actual behaviour
aiohttp closes the file instead.
Traceback (most recent call last):
File "test.py", line 31, in <module>
asyncio.get_event_loop().run_until_complete(run())
File "...\Python36\lib\asyncio\base_events.py", line 466, in run_until_complete
return future.result()
File "test.py", line 27, in run
b.seek(0)
ValueError: I/O operation on closed file.
GitMate.io thinks the contributor most likely able to help you is @asvetlov.
Possibly related issues are #3296 (aiohttp client session. it doesn't close a connection after keepalive_timeout), #1907 (aiohttp 2.x closing client request data stream), #3628 (Session not closed in aiohttp.request after exception), #2849 (Getting Connection closed with aiohttp client), and #58 (aiohttp.HttpClient).
Long story short
aiohttp
seems to close files after the request is over, meaning a file object cannot be reused once a request is sent.Expected behaviour
The file should not be closed and I can reuse my file objects following a
seek
call.Actual behaviour
aiohttp
closes the file instead.Steps to reproduce
The equivalent
requests
code does not error:Your environment
aiohttp version: 3.5.4
Python version: 3.6.1
OS: Windows 8.1
The text was updated successfully, but these errors were encountered: