adamjakab / BeetsPluginBpmAnalyser

A beets plugin for obsessive-compulsive music geeks to add BPM information to their songs.
MIT License
26 stars 4 forks source link

ImportError with recent beets version #21

Closed andrewjw closed 2 months ago

andrewjw commented 2 months ago
** error loading plugin bpmanalyser:
Traceback (most recent call last):
  File "/home/andrew/.local/lib/python3.10/site-packages/beets/plugins.py", line 269, in load_plugins
    namespace = __import__(modname, None, None)
  File "/usr/local/lib/python3.10/dist-packages/beetsplug/bpmanalyser/__init__.py", line 9, in <module>
    from beets.util import cpu_count
ImportError: cannot import name 'cpu_count' from 'beets.util' (/home/andrew/.local/lib/python3.10/site-packages/beets/util/__init__.py)

Setup

andrewjw commented 2 months ago

This was removed in this commit - https://github.com/beetbox/beets/commit/19470f3d767ea8b1435f81748821068af2c79661

Looks like the fix is replace it with os.cpu_count()

andrewjw commented 2 months ago

I think I was running an old version of this plug in (the problem was fixed in https://github.com/adamjakab/BeetsPluginBpmAnalyser/commit/15cfd1e9c57546157c21184c197f67f6a7ec332e). Sorry for the noise!