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

RuntimeError: Property was expected to be a blob, but is not a blob #138

Open
JorianRennen opened this issue Nov 15, 2021 · 1 comment
Open

Comments

@JorianRennen
Copy link

Hi there,

While trying to get all microphones via sc.all_microphones, i got this error.
It seems to be in the channel part of the return, but I have no idea where this is coming from or how to fix this.
sc.default_microphone works just fine.

Here the traceback:
Traceback (most recent call last): File "C:/Users/Jorian Rennen/PycharmProjects/Test_project/Feedback_terminal.py", line 41, in <module> print(sc.all_microphones(include_loopback=True)) File "C:\Users\Jorian Rennen\PycharmProjects\Test_project\venv\lib\site-packages\soundcard\mediafoundation.py", line 464, in __repr__ return '<Microphone {} ({} channels)>'.format(self.name,self.channels) File "C:\Users\Jorian Rennen\PycharmProjects\Test_project\venv\lib\site-packages\soundcard\mediafoundation.py", line 395, in channels raise RuntimeError('Property was expected to be a blob, but is not a blob') RuntimeError: Property was expected to be a blob, but is not a blob

Thank you in advance!

@bastibe
Copy link
Owner

bastibe commented Nov 17, 2021

This means that one of your sound card does not return the channels property as a blob. How strange.

This happens in https://github.com/bastibe/SoundCard/blob/master/soundcard/mediafoundation.py#L379

To debug this, you'll have to debug into the linked channels function, check the returned type (propvariant.ptr[0].vt), and figure out how to get a valid channel from the propvariant.

If you find a solution, I'll be happy to merge it. But I can't debug this on my end, because none of my sound cards behave this way.

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