jterrace / pyharmony

Python library for connecting to and controlling the Logitech Harmony Link
BSD 3-Clause "New" or "Revised" License
129 stars 110 forks source link

Fails with OSError: [Errno 57] Socket is not connected #13

Open jimboca opened 4 years ago

jimboca commented 4 years ago

I've been using this for a long time on Raspberry Pi with Python 3.5 but now on a machine with FreeBSD and Python 3.7 it's failing with:

Traceback (most recent call last):
  File "/var/polyglot/nodeservers/HarmonyHub/harmony_hub_nodes/HarmonyController.py", line 221, in _discover
    discover_result = harmony_discovery.discover(scan_attempts=10,scan_interval=1)
  File "/var/polyglot/.local/lib/python3.7/site-packages/pyharmony/discovery.py", line 107, in discover
    return Discovery().discover(scan_attempts, scan_interval)
  File "/var/polyglot/.local/lib/python3.7/site-packages/pyharmony/discovery.py", line 90, in discover
    listen_socket.shutdown(socket.SHUT_RDWR)
OSError: [Errno 57] Socket is not connected

Not sure if this is caused by FreeBSD differences or Python.