adamjakab / BeetsPluginBpmAnalyser

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

New error after 1.5.6 release "AttributeError: 'BpmAnalyserCommand' object has no attribute 'analyse'" #14

Closed arogl closed 3 months ago

arogl commented 4 months ago

Problem

During import I get an error when BPM runs

beet -vv imp .

and

beet imp .

produce the same information during import, once bpm analyser starts

Led to this problem:

beet imp .
E:\New_Music\import\   (1 items)
Tagging:

URL:

(Similarity: 100.0%) (Spotify, 2020, RCA/Famouz Records)
 * Don't Mean A Thing
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Scripts\beet.exe\__main__.py", line 7, in <module>
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\ui\__init__.py", line 1285, in main
    _raw_main(args)
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\ui\__init__.py", line 1272, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\ui\commands.py", line 973, in import_func
    import_files(lib, paths, query)
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\ui\commands.py", line 943, in import_files
    session.run()
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\importer.py", line 340, in run
    pl.run_parallel(QUEUE_SIZE)
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\util\pipeline.py", line 446, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\util\pipeline.py", line 311, in run
    out = self.coro.send(msg)
          ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\util\pipeline.py", line 193, in coro
    func(*(args + (task,)))
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\importer.py", line 1535, in plugin_stage
    func(session, task)
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beets\plugins.py", line 145, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\arogl\AppData\Local\Programs\Python\Python312\Lib\site-packages\beetsplug\bpmanalyser\__init__.py", line 43, in imported
    BpmAnalyserCommand(self.config).analyse(item)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'BpmAnalyserCommand' object has no attribute 'analyse'

Setup

My configuration (output of beet config) is:

bpmanalyser:
  auto: yes
  dry-run: no
  write: yes
  threads: 8
  force: no
  quiet: no

My plugin version (output of beet bpmanalyser -v) is:

bpmanalyser: Bpm Analyser(beets-bpmanalyser) plugin for Beets: v1.5.6

Disabling beets config for threaded did not fix the issue.

I can help with running a git version for debug.

I'll import and then try running over the newly imported items

arogl commented 4 months ago

Tested with beet bpmanalyser bpm:0 added:2024-05-05.. and it all worked

This is related to the import process

arogl commented 4 months ago

Hold that, it may have been beets was updated to a non-git version :cry:

arogl commented 4 months ago

Updated to latest git and that did not fix it 😠

adamjakab commented 3 months ago

@arogl - thanks for reporting this - I am taking a look - I picked up this project after a long time and I must have messed up something.

adamjakab commented 3 months ago

I confirm that this is bug during the import process. Until this gets fixed, pls set auto: no and run bpmanalyser manually afer the import: beet bpmanalyser bpm:0.

adamjakab commented 3 months ago

New release v1.5.7 deployed. Do pip install beets-bpmanalyser -U to update.

adamjakab commented 3 months ago

Pls make sure you use release v1.5.8. There was still a minor issue in v1.5.7.

arogl commented 3 months ago

Tested an import and worked successfully.

Thanks, I know how hard to pick up something after sometime and make changes, appreciate the effort.