It's due to multiple calls of asycio.run. I was able to resolve it by embedding my kasa work in an async function and then only calling asyncio.run once to run that function.
#333 improved the documentation on how to use the library when making multiple requests, so I think this can be closed. If you are still having issues, please feel free to reopen with more context (i.e., adding a minimal code example).
Activity
jimboca commented on Oct 25, 2021
I'm trying to upgrade my https://github.com/jimboca/udi-poly-kasa from using pyhton-kasa pre release and having this issue as well.
CardboardTurkey commented on Oct 25, 2021
It's due to multiple calls of asycio.run. I was able to resolve it by embedding my kasa work in an async function and then only calling asyncio.run once to run that function.
jimboca commented on Oct 25, 2021
Thanks, yes, it's more difficult in my case but should be possible somehow.
rytilahti commented on Apr 9, 2022
#333 improved the documentation on how to use the library when making multiple requests, so I think this can be closed. If you are still having issues, please feel free to reopen with more context (i.e., adding a minimal code example).