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

module 'soundfile' has no attribute 'SoundFileRuntimeError' #414

Open
abavisani opened this issue Oct 18, 2023 · 6 comments
Open

module 'soundfile' has no attribute 'SoundFileRuntimeError' #414

abavisani opened this issue Oct 18, 2023 · 6 comments

Comments

@abavisani
Copy link

I am receiving the above error while using librosa.load(). Any thought on what's the root of the issue?

@bastibe
Copy link
Owner

bastibe commented Oct 19, 2023

The source code of soundfile clearly does have the SoundFileRuntimeError defined. You could check what version of soundfile you received.

@notadoktor
Copy link

I just ran across this error myself. I mistakenly installed pysoundfile rather than soundfile. The old package name is at version 0.9.0 and SoundFileRuntimeError was added in 0.11.

Related: librosa/librosa#1624

@bastibe
Copy link
Owner

bastibe commented Oct 25, 2023

It's a tough call. I could replace pysoundcard with an incompatible stub to get people to update to soundcard. But I hate breaking other peoples' code for no reason.

@notadoktor
Copy link

Maybe put in a deprecation warning?

@bastibe
Copy link
Owner

bastibe commented Oct 27, 2023

Deprecation warnings are hidden by default, which is a bit of a shame really. Or we just wait it out. Usage of pysoundfile has been slowly declining, so it's not a huge problem.

@boeddeker
Copy link
Contributor

I could replace pysoundcard with an incompatible stub to get people to update to soundcard.

How about updating pysoundfile to be an empty package that depends on soundfile?
If people need the old package, they could pin the version number,
otherwise, they would get the recent version.

The reason, why I am suggesting this is:
When you install first soundfile and then pysoundfile, pip says you have soundfile installed, but
the source code is from pysoundfile (i.e., the old code).
The first time, when I hit this issue, it took me some time to figure out, that the source code from soundfile was replaced by pysoundfile.

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

4 participants