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

Discovery on WSL results in OSError: [Errno 22] Invalid argument · Issue #246 · python-kasa/python-kasa · GitHub

Repository navigation

Discovery on WSL results in OSError: [Errno 22] Invalid argument #246

Closed

Description

Possibly related to 124

$  kasa

No host name given, trying discovery..
Discovering devices on 255.255.255.255 for 3 seconds
ERROR:asyncio:Exception in callback _DiscoverProtocol.connection_made(<_SelectorDat...e, bufsize=0>>)
handle: <Handle _DiscoverProtocol.connection_made(<_SelectorDat...e, bufsize=0>>)>
Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/mnt/g/Code/kasa/venv/lib/python3.8/site-packages/kasa/discover.py", line 51, in connection_made
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
  File "/usr/lib/python3.8/asyncio/trsock.py", line 82, in setsockopt
    self._sock.setsockopt(*args, **kwargs)
OSError: [Errno 22] Invalid argument
$ kasa discover

Discovering devices on 255.255.255.255 for 3 seconds
ERROR:asyncio:Exception in callback _DiscoverProtocol.connection_made(<_SelectorDat...e, bufsize=0>>)
handle: <Handle _DiscoverProtocol.connection_made(<_SelectorDat...e, bufsize=0>>)>
Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/mnt/g/Code/kasa/venv/lib/python3.8/site-packages/kasa/discover.py", line 51, in connection_made
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
  File "/usr/lib/python3.8/asyncio/trsock.py", line 82, in setsockopt
    self._sock.setsockopt(*args, **kwargs)
OSError: [Errno 22] Invalid argument

This is with version 0.4.0

Activity

  1. rytilahti commented on Nov 1, 2021

    Member

    That error is coming from your operating system, are you running on Linux or something else?

  2. GregHilston commented on Nov 1, 2021

    Author
  3. changed the title [-]Running `$ kasa` or `kasa discover` Results In Invalid argument[/-] [+]Discovery on WSL results in OSError: [Errno 22] Invalid argument[/+] on Nov 2, 2021
  4. rytilahti commented on Nov 2, 2021

    Member

    Sure thing, it's a likely a legit bug that should be fixed. I updated the title to make it more discoverable, thanks for reporting!

  5. GregHilston commented on Nov 2, 2021

    Author

    Awesome, thanks for updating the title! Also thanks for being so approachable and having a great attitude.

    Loving the idea of this project. Cheers!

  6. rytilahti commented on Jan 8, 2022

    Member

    @GregHilston sorry for the delay, do you mind testing if the linked PR fixes the issue?

  7. GregHilston commented on Jan 8, 2022

    Author

    Hey sure thing! I'll have to test it out tomorrow. Will report back!

  8. GregHilston commented on Jan 8, 2022

    Author

    @rytilahti Got to it this morning, and its a success!!!

    I'm getting back a query of all my Kasa devices with your branch on WSL

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

    bugSomething isn't working

    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