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
{{ message }}
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
will produce following output and terminate with exception:
read 65536 bytes
read 65536 bytes
Traceback (most recent call last):
File "read_subprocess.py", line 18, in <module>
asyncio.get_event_loop().run_until_complete(execute())
File "/usr/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "read_subprocess.py", line 9, in execute
data = await process.stdout.read(65536)
File "/usr/lib/python3.6/asyncio/streams.py", line 634, in read
self._maybe_resume_transport()
File "/usr/lib/python3.6/asyncio/streams.py", line 402, in _maybe_resume_transport
self._transport.resume_reading()
File "/usr/lib/python3.6/asyncio/unix_events.py", line 401, in resume_reading
self._loop._add_reader(self._fileno, self._read_ready)
AttributeError: 'NoneType' object has no attribute '_add_reader'
When the process exits https://github.com/python/asyncio/blob/master/asyncio/unix_events.py#L444 is called which sets this._loop = None
Next time read() is called on the pipe the above exception is thrown.
I have tried to fix this issue myself but would sometimes have read terminate too early and miss the last chunks of data.