Closed luanon404 closed 4 months ago
Im using Windows so should use ProactorEventLoop instead of SelectorEventLoop
From the traceback, it seems that you switched loop implementation from the middle. You should select loop as early as possible.
From the traceback, it seems that you switched loop implementation from the middle. You should select loop as early as possible.
yes, because on windows, SelectorEventLoop limit amount of pipe can open, so they made ProactorEventLoop, i dont know can i use ProactorEventLoop instead of SelectorEventLoop? or change something in the code?
i tried pass ProactorEventLoop loop into session class to bypass the limit, but its say the future waited in different loop
so i wonder that u not use same loop for all code
If you want to use ProactorLoop, you don’t need to do anything, since it’s the default one.
If you want to use ProactorLoop, you don’t need to do anything, since it’s the default one.
but i got this when run like 700 threads,
Exception in thread Tornado selector:
Traceback (most recent call last):
File "D:\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "D:\Python\Python312\Lib\threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "F:\python\MicrosoftOutlook\.venv\Lib\site-packages\curl_cffi\_asyncio_selector.py", line 201, in _run_select
rs, ws, xs = select.select(to_read, to_write, to_write)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many file descriptors in select()
still use SelectorEventLoop , so its not default ProactorEventLoop ?
i dont know why but i solved by add time.sleep(0.01) before select command,
maybe its running too fast before it data coming
possible fix, change from asyncio.SelectorEventLoop into asyncio.ProactorEventLoop, when i set ProactorEventLoop loop, i got