FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

How to resolve "Detected protocol reuse between different event loop" warning? · Issue #238 · python-kasa/python-kasa · GitHub

Repository navigation

How to resolve "Detected protocol reuse between different event loop" warning? #238

Closed

Description

I'm trying to use the kasa API as part of my pytest setup but when making multiple calls to functions in the API I get:

WARNING kasa.protocol:protocol.py:47 Detected protocol reuse between different event loop

Can I get some advice on how to resolve this warning?

Activity

  1. jimboca commented on Oct 25, 2021

    Contributor

    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.

  2. CardboardTurkey commented on Oct 25, 2021

    Author

    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.

  3. jimboca commented on Oct 25, 2021

    Contributor

    Thanks, yes, it's more difficult in my case but should be possible somehow.

  4. rytilahti commented on Apr 9, 2022

    Member

    #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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL