Skip to content

Cannot run discovery.py on mac (wifi or eth) - Can't assign requested address #3

@lyricnz

Description

@lyricnz

Should discovery work on wifi?

❯ python3 ./discovery.py -i en0
Traceback (most recent call last):
  File "/Users/simonroberts/src/github/philippechataignon/smrt/./discovery.py", line 47, in <module>
    main()
  File "/Users/simonroberts/src/github/philippechataignon/smrt/./discovery.py", line 33, in main
    switches = discover_switches(args.interface)
  File "/Users/simonroberts/src/github/philippechataignon/smrt/./discovery.py", line 14, in discover_switches
    net = Network(interface)
  File "/Users/simonroberts/src/github/philippechataignon/smrt/network.py", line 64, in __init__
    self.rs.bind((Network.BROADCAST_ADDR, Network.UDP_RECEIVE_FROM_PORT))
OSError: [Errno 49] Can't assign requested address

System is

❯ uname -a
Darwin simonmac.roberts 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64

Ventura 13.1 (22C65)

I guess I don't know how this works - was assuming it was either via web-scraping, or some magic API. Will try on a real linux box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions