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

Issue on macOS with Python 3.11 #137

Open
stblassitude opened this issue Dec 15, 2023 · 4 comments
Open

Issue on macOS with Python 3.11 #137

stblassitude opened this issue Dec 15, 2023 · 4 comments

Comments

@stblassitude
Copy link

File "/Users/XXXXX-G8Eyb2Im/lib/python3.11/site-packages/opuslib/api/ctl.py", line 66, in inner
    raise opuslib.exceptions.OpusError(result_code)
opuslib.exceptions.OpusError: b'invalid argument'

The line that is triggering the error in libopus and hence the exception: soundoutput.py:151

self.encoder.bitrate = self.bandwidth - overhead_per_second

I'm not sure if there is a problem in pymumble or libopus, but the same code with the same Python version on Debian appears to work without issue. I'm a bit stumped.

@stblassitude
Copy link
Author

Kind of out of curiosity, I downgraded my pipenv to 3.9, and now it's working. Still don't understand what the issue is, but at least I can continue working on my code.

@stblassitude stblassitude changed the title Issue on macOS? Issue on macOS with Python 3.11 Dec 15, 2023
@stblassitude
Copy link
Author

The relevant code to trigger the error is very straigtforward:

    mumble = pymumble_py3.Mumble(**server_args)
    mumble.start()
    mumble.is_ready()

@stblassitude
Copy link
Author

Curioser and curioser. After switching to Python 3.9, I didn't get the crash on connecting, but I also didn't get any audio; mumble.sound_output was None. Setting mumble.set_receive_sound(True) before connecting fixed that, but it also brings back the first error.

@stblassitude
Copy link
Author

The debug log output just before the error is

2023-12-15 23:57:29,465-PyMumble-DEBUG-Bandwidth is 50000, downgrading to 30400 due to the protocol overhead

I'm not sure the bandwidth can be chosen arbitrarily, but I don't claim to understand how Opus works.

Simply commenting out the line leads to working code?

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

1 participant