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

Toggle Mute Error #29

Closed
MaxiMars73 opened this issue Jan 6, 2024 · 2 comments
Closed

Toggle Mute Error #29

MaxiMars73 opened this issue Jan 6, 2024 · 2 comments

Comments

@MaxiMars73
Copy link

Hello!
cdsp = CamillaClient("127.0.0.1", port)
cdsp.connect()
current_mute = cdsp.mute.toggle_fader(0)
print(f"Current Mute: {current_mute}")

Throws an error: OSError: Invalid response received: '{"Invalid":{"error":"invalid type: integer 0, expected unit at line 1 column 16"}}'

I tried to debug it myself, unfortunately without success.

def toggle_fader(self, fader: int) -> bool:
    _fader, new_mute = self.client.query("SetFaderMute", arg=int(fader))  // SetFaderMute ToggleMute
    return new_mute

"SetFaderMute" seems a bit strange there, but "ToggleFader" doesn't work either.

@HEnquist
Copy link
Owner

HEnquist commented Jan 6, 2024

Thanks for reporting! That's a copy-paste error, the command is supposed to be "ToggleFaderMute". I fixed it and added some tests here: #30

@HEnquist
Copy link
Owner

HEnquist commented Jan 8, 2024

This is now fixed in the v2.0.2 release.

@HEnquist HEnquist closed this as completed Jan 8, 2024
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

2 participants