Skip to content

Module requests_ratelimiter not found when loading plugin musicbrainz #6351

@snit-guckfung

Description

@snit-guckfung

Problem

Running this command in verbose (-vv) mode (note: this error occurs on every command, and imports just don't match anymore):

$ beet -vv --plugins="musicbrainz" version

Led to this problem:

user configuration: /home/snit/etc/beets/config.yaml
data directory: /home/snit/etc/beets
plugin paths: ['/home/snit/etc/beets/plugins']
Loading plugins: musicbrainz
** error loading plugin musicbrainz
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/beets/plugins.py", line 453, in _get_plugin
    namespace = import_module(f"{PLUGIN_NAMESPACE}.{name}")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3.12/site-packages/beetsplug/musicbrainz.py", line 35, in <module>
    from ._utils.musicbrainz import MusicBrainzAPIMixin
  File "/usr/lib/python3.12/site-packages/beetsplug/_utils/musicbrainz.py", line 19, in <module>
    from requests_ratelimiter import LimiterMixin
ModuleNotFoundError: No module named 'requests_ratelimiter'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/beets/plugins.py", line 455, in _get_plugin
    raise PluginImportError(name) from exc
beets.plugins.PluginImportError: Could not import plugin musicbrainz
Sending event: pluginload
library database: /media/music.db
library directory: /media/music
Sending event: library_opened
beets version 2.6.1
Python version 3.12.12
no plugins loaded
Sending event: cli_exit

Setup

  • OS: Alpine Linux
  • Python version: Python 3.12
  • beets version: 2.6.1
  • Turning off plugins made problem go away (yes/no): yes, it only effects musicbrainz and missing of the plugins I use

My configuration (output of beet config) is:

directory: /media/music
# --------------- Main ---------------

library: /media/music.db

# --------------- Tagging ---------------

per_disc_numbering: yes

pluginpath: /home/snit/etc/beets/plugins

# --------------- Plugins ---------------

plugins: fromfilename musicbrainz scrub lastgenre fetchart embedart missing

match:
    ignore_video_tracks: no

import:
    bell: yes
    move: yes
    log: /home/snit/var/log/beets.log
lastgenre:
    canonical: yes
    count: 3
    separator: ;
    keep_existing: no
    force: yes
    whitelist: yes
    min_weight: 10
    fallback:
    source: album
    auto: yes
    prefer_specific: no
    title_case: yes
    pretend: no
fetchart:
    high_resolution: yes
    auto: yes
    minwidth: 0
    maxwidth: 0
    quality: 0
    max_filesize: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    fallback:
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    - cover_art_url
    store_source: no
    deinterlace: no
    cover_format:
    lastfm_key: REDACTED
    fanarttv_key: REDACTED
    google_key: REDACTED
    google_engine: REDACTED

aunique:
    keys: albumartist album year catalognum
    disambiguators: mb_albumid
paths:
    default: Albums/$albumartist/$album [$year] ($catalognum) %aunique{}/$disc-$track - $title
    comp: Compilations/$albumartist/$album [$year] ($catalognum) %aunique{}/$disc-$track - $title
disabled_plugins: []
scrub:
    auto: yes
embedart:
    maxwidth: 0
    auto: yes
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    quality: 0
    clearart_on_import: no

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions