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

problem loading audio #17

Closed
freekatet opened this issue Aug 13, 2023 · 3 comments
Closed

problem loading audio #17

freekatet opened this issue Aug 13, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@freekatet
Copy link

Hello, I am trying to run PyMusicLooper on a m1 , python 3.9
and I have this error showing:
ERROR ###.mp3 could not be loaded. It might not contain valid audio data, or is in an supported format.

which is weird cause I use librosa and this exact same file with other projects with no problem,
I tried other formats than mp3 same problem
I tried with an url same problem, tho i see the link is being downloaded.

thank you

@freekatet freekatet added the bug Something isn't working label Aug 13, 2023
@arkrow
Copy link
Owner

arkrow commented Aug 13, 2023

If you're getting that error message, then it failed at the librosa.load() function call. Unfortunately, I do not have access to a Mac device, so I cannot provide any direct support, but I've improved the debug flag to help you track down the source of the problem. Try using the latest git version of PyMusicLooper with the --debug flag active (e.g. pymusiclooper --debug export-points --path "track.mp3"), and let me know what error the traceback shows by attaching it here.

@freekatet
Copy link
Author

Librosa works well on other project, looks like its coming from taglib , pytaglib. When I reinstall everything into a new environnement. error points to it .. didn't found a fix yet sadly.

import taglib
ImportError: dlopen(/Users/frexkatet/.pyenv/versions/3.9.2/lib/python3.9/site-packages/taglib.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '__ZN6TagLib10StringList6appendERKNS_6StringE'

just commented the tag parts in core.py as I don't need it for now. Rest is working ::)

@arkrow arkrow closed this as completed in 8c63013 Aug 15, 2023
@arkrow
Copy link
Owner

arkrow commented Aug 15, 2023

This looks like a problem with the pytaglib / taglib binary on M1 Mac devices. To resolve, you will probably need to first uninstall the library (pip uninstall pytaglib) and then force pip to compile the package locally from source using pip install --no-binary :all: pytaglib.

If using pipx, I believe the equivalent command would be pipx runpip pymusiclooper uninstall pytaglib followed by pipx runpip pymusiclooper install --no-binary :all: pytaglib.

As an official workaround, external libraries will be loaded only when needed in the next release, so that rest of the functionalities can still work if an import problem like this one exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants