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
I haven't looked that deeply into fixing it, as I have a very vague understanding how how WiZ light networking works, but the exception is caused by the pywizlight.wizlight.__del__ function attempting to use the event loop (calling self._async_close), however there is no guarantee that the __del__ function gets called while there's still an event loop. In the above code, light.__del__ gets called after the asyncio.run call returns, thus the event loop is closed already.
Removing the pywizlight.wizlight.__del__ function appears to avoid all of the issues, however as I said, I'm not sure how the networking with the lights works/if not explicitly closing the transport even matters.
Running the example code on Python 3.9:
Shows a DeprecationWarning:
Remove
loop=loop
for Python 3.10 compatibility.The text was updated successfully, but these errors were encountered: