-
Notifications
You must be signed in to change notification settings - Fork 11
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 #31
Comments
@CausticD thank you for bringing this to my attention and for the detailed content! I will be taking a look at this today and prioritizing it over feature development as it looks like a bug to me. |
@CausticD I had an HS100 on hand and unfortunately was not able to reproduce this. I was using a fresh install of Python 3.9.4 on Mac OS X. What version of Python 3.9 are you using and on what OS? |
Doing some digging, it looks like this is most likely a Windows-specific Python issue aio-libs/aiohttp#4324 I will see if it makes sense to add in a workaround to this library to silence the exception being thrown as it looks concerning but is actually harmless to the library's functionality. |
@CausticD when you have a moment, and assuming you were running on Windows, could you try running this Python script as a workaround to the issue? https://gist.github.com/piekstra/3b579d8843232d897eca657c1577f5a7 I am not sure if it simply has to be run once on a Windows machine and will then resolve the issue thereafter. Given it is a workaround and the libraries haven't fixed the issue yet in a public release, I would not want to add this to be a default part of this library. If it successfully silences the exception for you, I will simply mention it in the README.md for this library. |
@piekstra Wow, that was fast! Many thanks. Yup, a brand new 3.9.4 install on Windows and yes that does fix it! However, it seems to be needed every time in my very limited testing. |
@CausticD that's actually good news that it requires it every time! That alleviates a concern I had about building it into the library and potentially causing some sort of permanent change to behaviors on someone's system. I will have a pull request / branch up shortly that I'd like you to test out when you get a chance. |
@piekstra Yup, that seems good to me. Reverted my change, added yours and still fine. |
@CausticD excellent! I will add it in officially then and cut a release with the fix. |
Hi,
Using a very simple test code on Python 3.9:
I get the following output:
The plug toggles fine, but the runtime error is always thrown.
The text was updated successfully, but these errors were encountered: