Asyncio Error, An Operation Was Attempted On Something That Is Not A Socket
I'm currently working on the current toy code to try and understand the asyncio module. import asyncio import os, sys, traceback from time import time os.environ['PYTHONASYNCIODEB
Solution 1:
select()
works only with sockets on Windows.
To work with file descriptors, you could try non-select-based event loop, code example:
if os.name == 'nt':
loop = asyncio.ProactorEventLoop() # forsubprocess' pipes on Windows
asyncio.set_event_loop(loop)
else:
loop = asyncio.get_event_loop()
Though I doubt that it would help with sys.stdin
and asyncio
, code example.
Post a Comment for "Asyncio Error, An Operation Was Attempted On Something That Is Not A Socket"