network-audio-controller icon indicating copy to clipboard operation
network-audio-controller copied to clipboard

SIGPIPE unavailable on Windows10/11 : catch exception ?

Open rem5 opened this issue 1 year ago • 4 comments

Hi,

EDIT: not seen previous open issue related to it: https://github.com/chris-ritsen/network-audio-controller/issues/9

netaudio device list gives me error on Windows 11: site-packages\netaudio\console\application.py", line 1, in <module> from signal import signal, SIGPIPE, SIG_DFL ImportError: cannot import name 'SIGPIPE' from 'signal' (C:\Program Files\Python312\Lib\signal.py). Did you mean: 'SIGFPE'?

Seen there: https://stackoverflow.com/questions/58718659/cannot-import-name-sigpipe-from-signal-in-windows-10

Replacing this solved in https://github.com/chris-ritsen/network-audio-controller/blob/master/netaudio/console/application.py the problem for me:

try:
    from signal import signal, SIGPIPE, SIG_DFL
    signal(SIGPIPE, SIG_DFL)
except ImportError:  # If SIGPIPE is not available (win32),
    pass             # we don't have to do anything to ignore it.

But don't know if it's the best solution.

rem5 avatar Apr 16 '24 15:04 rem5

@rem5 Could you test the PR on your end please?

Mo-way avatar Sep 10 '24 07:09 Mo-way

I just tried this edit manually and it works for me.

muzicman82 avatar Oct 18 '24 12:10 muzicman82

@muzicman82 If using the master branch, this should already be fixed: https://github.com/chris-ritsen/network-audio-controller/pull/23

Mo-way avatar Oct 18 '24 18:10 Mo-way

@muzicman82 If using the master branch, this should already be fixed: #23

I just did pip install netaudio.

muzicman82 avatar Oct 18 '24 18:10 muzicman82