Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Event loop is closed #13

Open
iojw opened this issue Jan 21, 2020 · 1 comment
Open

RuntimeError: Event loop is closed #13

iojw opened this issue Jan 21, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@iojw
Copy link
Owner

iojw commented Jan 21, 2020

When running on Windows with Python 3.8, the following exception is thrown after the results of socialscan are printed.

Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x03F71DA8>
Traceback (most recent call last):
  File "c:\users\isaac\appdata\local\programs\python\python38-32\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "c:\users\isaac\appdata\local\programs\python\python38-32\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "c:\users\isaac\appdata\local\programs\python\python38-32\lib\asyncio\base_events.py", line 711, in call_soon
    self._check_closed()
  File "c:\users\isaac\appdata\local\programs\python\python38-32\lib\asyncio\base_events.py", line 504, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

As far as I can tell, this is due to the change whereby Python 3.8 now uses ProactorEventLoop as the default event loop on Windows which causes this exception to be thrown in aiohttp. A fix appears to be scheduled for the next release of aiohttp (aio-libs/aiohttp#4324).

@iojw iojw added the bug Something isn't working label Jan 21, 2020
@iojw
Copy link
Owner Author

iojw commented Jan 26, 2020

To avoid this error from clogging up the output, I've now set the event loop policy explicitly to SelectorEventLoop when this tool is run on Windows on Python 3.8. However, I understand that ProactorEventLoop is still the more performant event loop on Windows so I'll likely switch back to ProactorEventLoop if the upcoming release of aiohttp fixes this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant