Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGPIPE unavailable on Windows10/11 : catch exception ? #17

Open
rem5 opened this issue Apr 16, 2024 · 4 comments
Open

SIGPIPE unavailable on Windows10/11 : catch exception ? #17

rem5 opened this issue Apr 16, 2024 · 4 comments

Comments

@rem5
Copy link

rem5 commented Apr 16, 2024

Hi,

EDIT: not seen previous open issue related to it: #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.

Mo-way added a commit to Mo-way/network-audio-controller that referenced this issue Sep 10, 2024
This should fix chris-ritsen#9 and chris-ritsen#17, which are duplicates of each other.
There are cleaner solutions, mentioned on stackoverflow, but they are
very verbose and hard to understand. See:
https://stackoverflow.com/questions/14207708/
@Mo-way
Copy link
Contributor

Mo-way commented Sep 10, 2024

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

chris-ritsen added a commit that referenced this issue Sep 12, 2024
Fix #9 and #17 SIGPIPE import issue on windows
@muzicman82
Copy link

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

@Mo-way
Copy link
Contributor

Mo-way commented Oct 18, 2024

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

@muzicman82
Copy link

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

I just did pip install netaudio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants