remcohaszing / pywakeonlan

A small python module for wake on lan.
https://pywakeonlan.readthedocs.io
MIT License
281 stars 68 forks source link

OSError: [Errno 49] Can't assign requested address #17

Closed thevickypedia closed 3 years ago

thevickypedia commented 3 years ago

I tried the send_magic_packet and it worked for a couple of attempts. After which I keep getting OSError.

from wakeonlan import send_magic_packet
send_magic_packet('01:2E:45:67:89:10')  # dummy mac address

Traceback below:

Traceback (most recent call last):
  File "/controls.py", line 139, in <module>
    send_magic_packet(os.getenv('tv_mac'))
  File "/venv/lib/python3.8/site-packages/wakeonlan.py", line 81, in send_magic_packet
    sock.send(packet)
OSError: [Errno 49] Can't assign requested address
thevickypedia commented 3 years ago

Figured out it was a network issue. Closing as "Not needed"