arkrow / PyMusicLooper

A python program for repeating music endlessly and creating seamless music loops, with play/export/tagging support.
https://pypi.org/project/pymusiclooper/
MIT License
260 stars 24 forks source link

installing results in broken version (tag-related) #28

Open gingerbeardman opened 10 months ago

gingerbeardman commented 10 months ago

Before continuing with the bug report, does updating to the latest version fix this issue? [Yes/No]

No

Describe the bug

Debugging Information

% pymusiclooper --version
Traceback (most recent call last):
  File "/opt/homebrew/bin/pymusiclooper", line 5, in <module>
    from pymusiclooper.__main__ import cli
  File "/opt/homebrew/lib/python3.11/site-packages/pymusiclooper/__main__.py", line 3, in <module>
    from .cli import cli_main
  File "/opt/homebrew/lib/python3.11/site-packages/pymusiclooper/cli.py", line 20, in <module>
    from .core import MusicLooper
  File "/opt/homebrew/lib/python3.11/site-packages/pymusiclooper/core.py", line 18, in <module>
    taglib = lazy.load("taglib")
             ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/lazy_loader/__init__.py", line 205, in load
    module = importlib.util.module_from_spec(spec)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(/opt/homebrew/lib/python3.11/site-packages/taglib.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__ZN6TagLib10StringList6appendERKNS_6StringE'

Expected behavior

Environment Information (please complete the following information):

Additional context Add any other context about the problem here.

gingerbeardman commented 10 months ago
% /opt/homebrew/opt/python@3.10/bin/python3.10 -m pip install --pre --no-binary :all: pymusiclooper

fails to install


$ /opt/homebrew/opt/python@3.11/bin/python3.11 -m pip install --pre --no-binary :all: pymusiclooper

installs a build broken in the same way as pip/pipx

gingerbeardman commented 10 months ago

This happens with all v3 versions.

I have been able to reinstall 2.5.3 successfully, using pipx/pip/source.

I've been on 2.5.3 since March/April 2023, and only thought to try to upgrade today.

gingerbeardman commented 10 months ago

Reading seems to indicate this may be a linking problem.

Really, it's out of my area of expertise.

arkrow commented 10 months ago

I believe this is the same issue as #17. Unfortunately, I cannot reproduce this issue as I do not have an M1-based Mac, but you can try re-installing pymusiclooper and all its dependencies from source in pipx using (based on your provided commands):

/opt/homebrew/opt/python@3.11/bin/python3.11 -m pipx runpip pymusiclooper install --ignore-installed --no-binary :all: pymusiclooper

Let me know if this works for you.

By the way, there shouldn't be a need for enabling the --pre pip flag (to fetch newer versions in pre-release stage) unless you are installing PyMusicLooper in a Python 3.12 environment, since numba's Python 3.12 supported version is currently in pre-release status (0.59.0rc1).

gingerbeardman commented 10 months ago

Hi, that's pretty much what I did at https://github.com/arkrow/PyMusicLooper/issues/28#issuecomment-1892090390 and it results in a broken binary.

And I just did your exact command and the same.

I'm not really a python developer, just a user.

So, I will just continue to use 2.5.3 as it works for me.

I mention the tool at https://blog.gingerbeardman.com/2023/12/09/dynamic-music-and-sound-techniques-for-video-games/

arkrow commented 10 months ago

Thanks for mentioning my tool @gingerbeardman. I'm glad you found it useful!

I've pushed a new release providing a workaround for this issue. Could you test the latest release and let me know if it fixes the issue for you?

While this release does not solve the root cause of the taglib ImportError problem (that issue is currently open at the library here: https://github.com/supermihi/pytaglib/issues/114), it isolates it to the tagging functions/commands only, so the rest of the library should be unaffected.