beetbox / beetbox/beets

Issue with musicbrainz plugin?

Open
#6,626 3 comments 0 reactions 0 assignees View on GitHub
musicbrainz needinfo
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

Running this command in verbose (`-vv`) mode:

```sh
$ beet -vv im .
```

Led to this problem:

```
user configuration: /home/peter/.config/beets/config.yaml
data directory: /home/peter/.config/beets
plugin paths: []
Loading plugins: badfiles, chroma, convert, discogs, edit, embedart, fetchart, inline, lastgenre, mbsync, missing, musicbrainz, replaygain, scrub, the, zero
fetchart: To use Spotify as an album art source, you must install the beautifulsoup4 module. See the documentation for further details.
fetchart: google: Disabling art source due to missing key
fetchart: lastfm: Disabling art source due to missing key
inline: adding item field artist_sort_path
inline: adding item field artist_sort_display
inline: adding album field albumartist_sort_path
inline: adding album field albumartist_sort_display
inline: adding album field format
lastgenre: Loading whitelist /home/peter/.local/share/pipx/venvs/beets/lib/python3.13/site-packages/beetsplug/lastgenre/genres.txt
Sending event: pluginload
library database: /home/peter/.config/beets/library.db
library directory: /Volumes/Music/Library
Sending event: library_opened
Sending event: import_begin
ignoring '@eaDir' due to ignore rule '@eaDir'
Sending event: import_task_created
Sending event: import_task_start
chroma: chroma: fingerprinted b'/Volumes/Music/Import/01. Addicted To You.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/02. \xe3\x82\xbf\xe3\x82\xa4\xe3\x83\xa0\xe3\x83\xbb\xe3\x83\xaa\xe3\x83\x9f\xe3\x83\x83\xe3\x83\x88.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/03. In My Room.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/04. time will tell.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/05. Never Let Go.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/06. Fly Me To The Moon (In Other Words).flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/07. Another Chance.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/08. For You.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/09. Automatic.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/10. Take On Me.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/11. Give Me A Reason.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/12. \xe3\x81\xaf\xe3\x82\x84\xe3\x81\xa8\xe3\x81\xa1\xe3\x82\x8a.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/13. I LOVE YOU.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/14. \xe3\x83\x97\xe3\x83\xac\xe3\x82\xa4\xe3\x83\x90\xe3\x83\x83\xe3\x82\xaf part2.flac'
chroma: no match found
chroma: chroma: fingerprinted b"/Volumes/Music/Import/15. Movin' on without you.flac"
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/16. First Love.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/17. Wait & See \xe3\x80\x9c\xe3\x83\xaa\xe3\x82\xb9\xe3\x82\xaf\xe3\x80\x9c.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/18. \xe7\x94\x98\xe3\x81\x84\xe3\x83\xaf\xe3\x83\x8a\xe3\x80\x9cPaint It, Black.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/19. Living On My Own.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/20. B&C.flac'
chroma: no match found
chroma: chroma: fingerprinted b'/Volumes/Music/Import/21. First Love (John Luongo remix).flac'
chroma: no match found
Looking up: /Volumes/Music/Import
Tagging 宇多田ヒカル - Bohemian Summer 2000
Searching for discovered album ID: 1445701d-2b65-45ea-9e1d-67f15f049ed3
musicbrainz: Requesting MusicBrainz release 1445701d-2b65-45ea-9e1d-67f15f049ed3
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: 宇多田ヒカル - Bohemian Summer 2000 (1445701d-2b65-45ea-9e1d-67f15f049ed3) from MusicBrainz
No tracks.
Album ID match recommendation is 0
Search terms: 宇多田ヒカル - Bohemian Summer 2000
Album might be VA: False
chroma: acoustid album candidates: 0
musicbrainz: Searching for '' with {'release': 'bohemian summer 2000', 'artist': '宇多田ヒカル'}
Searching for MusicBrainz releases with: 'release:(bohemian summer 2000) artist:(宇多田ヒカル)'
discogs: Searching for 'Bohemian Summer 2000' with {'type': 'release'}
discogs: Found 5 result(s)
discogs: Getting master release 1601285
musicbrainz: Found 5 result(s)
musicbrainz: Requesting MusicBrainz release 64c999e7-ead1-4295-afe1-7353af0c6b91
Sending event: mb_album_extract
Sending event: mb_album_extract
musicbrainz: Requesting MusicBrainz release 2fa49b6a-8954-374d-a80f-4f645f6f9ba4
Sending event: albuminfo_received
Candidate: Utada Hikaru - Bohemian Summer 2000 (1367216) from Discogs
Computing track assignment...
...done.
Success. Distance: 0.54
Sending event: album_matched
Sending event: albuminfo_received
Candidate: Utada Hikaru - Bohemian Summer 2000 (14086688) from Discogs
Computing track assignment...
...done.
Success. Distance: 0.68
Sending event: album_matched
Sending event: albuminfo_received
Candidate: Utada Hikaru - Bohemian Summer 2000 (16776783) from Discogs
Computing track assignment...
...done.
Success. Distance: 0.54
Sending event: album_matched
Sending event: albuminfo_received
Candidate: Utada Hikaru - Bohemian Summer 2000 (32804394) from Discogs
Computing track assignment...
...done.
Success. Distance: 0.57
Sending event: album_matched
Sending event: albuminfo_received
Candidate: Utada Hikaru - Bohemian Summer 2000 = 波西米亚夏日2000演唱会 (14632308) from Discogs
Computing track assignment...
...done.
Success. Distance: 0.59
Sending event: album_matched
Sending event: mb_album_extract
musicbrainz: Requesting MusicBrainz release 1445701d-2b65-45ea-9e1d-67f15f049ed3
Sending event: mb_album_extract
musicbrainz: Requesting MusicBrainz release 3bbc4645-6952-4156-9933-19dbbb3ba0ff
Sending event: mb_album_extract
musicbrainz: Requesting MusicBrainz release 29043639-6eb2-4c2b-887b-ad4773816027
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: 宇多田ヒカル - Bohemian Summer 2000 (64c999e7-ead1-4295-afe1-7353af0c6b91) from MusicBrainz
No tracks.
Sending event: albuminfo_received
Candidate: 宇多田ヒカル - Bohemian Summer 2000 (2fa49b6a-8954-374d-a80f-4f645f6f9ba4) from MusicBrainz
No tracks.
Sending event: albuminfo_received
Candidate: 宇多田ヒカル - Bohemian Summer 2000 (1445701d-2b65-45ea-9e1d-67f15f049ed3) from MusicBrainz
No tracks.
Sending event: albuminfo_received
Candidate: 宇多田ヒカル - Bohemian Summer 2000 (3bbc4645-6952-4156-9933-19dbbb3ba0ff) from MusicBrainz
No tracks.
Sending event: albuminfo_received
Candidate: Summer 2000 - Summer 2000 (29043639-6eb2-4c2b-887b-ad4773816027) from MusicBrainz
Computing track assignment...
...done.
Success. Distance: 0.81
Sending event: album_matched
Evaluating 6 candidates.

/Volumes/Music/Import (21 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate

Finding tags for album "宇多田ヒカル - Bohemian Summer 2000".
Candidates:
1. 45.7% Utada Hikaru - Bohemian Summer 2000
≠ artist, media, country, ...
Discogs, DVD, 2000, Japan, Toshiba EMI, TOBF-5060, None
2. 45.7% Utada Hikaru - Bohemian Summer 2000
≠ artist, media, country, ...
Discogs, DVD, 2000, Japan, Toshiba EMI, TOBF-5060, None
3. 42.6% Utada Hikaru - Bohemian Summer 2000
≠ artist, media, year, ...
Discogs, Blu-ray, 2025, Japan, Universal Music, UPXY-6101, None
4. 41.4% Utada Hikaru - Bohemian Summer 2000 = 波西米亚夏日2000演唱会
≠ artist, album, media, ...
Discogs, DVD, 2006, China, Toshiba EMI, 952002, None
5. 31.6% Utada Hikaru - Bohemian Summer 2000
≠ artist, country, catalognum, ...
Discogs, 2xCD, 2000, Hong Kong, EMI 百代, 07243 492488 2 3, None
6. 18.9% Summer 2000 - Summer 2000
≠ artist, album, media, ...
MusicBrainz, Digital Media, 2021, XW, None, None, None
➜ # selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? i
Enter release ID: 1445701d-2b65-45ea-9e1d-67f15f049ed3
Tagging 宇多田ヒカル - Bohemian Summer 2000
Searching for album IDs: 1445701d-2b65-45ea-9e1d-67f15f049ed3
musicbrainz: Requesting MusicBrainz release 1445701d-2b65-45ea-9e1d-67f15f049ed3
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: 宇多田ヒカル - Bohemian Summer 2000 (1445701d-2b65-45ea-9e1d-67f15f049ed3) from MusicBrainz
No tracks.
Evaluating 0 candidates.
Sending event: before_choose_candidate
No matching release found for 21 tracks.
For help, see: https://beets.readthedocs.org/en/latest/faq.html#nomatch
➜ [S]kip, Use as-is, as Tracks, Group albums, Enter search, enter Id, aBort,
eDit?```

Here's a link to the music files that trigger the bug (if relevant):

### Setup

* OS: Ubuntu 24.10
* Python version: 3.13
* beets version: 2.4
* Turning off plugins made problem go away (yes/no): no

My configuration (output of `beet config`) is:

```yaml
directory: /Volumes/Music/Library

import:
timid: yes
detail: yes
move: no
from_scratch: yes
set_fields:
library: 'Main'
ignore: .AppleDouble ._* *~ .DS_Store @eaDir
max_filename_length: 64
asciify_paths: no
art_filename: Folder
plugins: badfiles chroma convert discogs edit embedart fetchart inline lastgenre mbsync missing musicbrainz replaygain scrub the zero
threaded: yes
original_date: yes
format_item: $library - $artist_sort_display - $album - $track - $title ($genre) - $length - $format ($bitrate)
format_album: $library - $albumartist_sort_display - $year - $album ($genre) - $format
sort_item: artist+ year+ album+ disc+ track+
sort_album: albumartist+ year+ album+

edit:
itemfields: track title artist artist_sort album
albumfields: album albumartist albumartist_sort

match:
preferred:
countries: ['US', 'GB|UK', 'XE', 'DE', 'NL', 'CN', 'HK', 'TW']
media: ['CD', 'Digital Media|File', 'DVD']
original_year: yes

ui:
color: yes

album_fields:
albumartist_sort_path: albumartist if albumartist == albumartist_sort or albumartist_sort == '' else albumartist_sort
albumartist_sort_display: albumartist if albumartist == albumartist_sort or albumartist_sort == '' else u'%s (%s)' % (albumartist_sort, albumartist)
format: return items[0].format

item_fields:
artist_sort_path: artist if artist == artist_sort or artist_sort == '' else artist_sort
artist_sort_display: artist if artist == artist_sort or artist_sort == '' else u'%s (%s)' % (artist_sort,artist)

paths:
default: $library/%upper{%left{%the{$albumartist_sort_path},1}}/%the{$albumartist_sort_path}/($year) $album%aunique{}/$track. $title
singleton: $library/Non-Album/%the{$artist_sort_path}/$title
comp: $library/Compilations/($year) $album%aunique{albumartist album,format}/$track. $title

aunique:
keys: albumartist album
disambiguators: format channels albumtype year country label catalognum albumdisambig releasegroupdisambig
bracket: '[]'

replaygain:
auto: yes
overwrite: yes
backend: gstreamer

fetchart:
auto: yes
maxwidth: 500
sources:
- filesystem

embedart:
auto: yes

zero:
fields: comments

the:
patterns: ['^De ', '^Die ', '^Een ', '^Ein ']

convert:
auto: yes
format: flac
threads: 2
copy_album_art: yes
embed: yes
never_convert_lossy_files: yes
quiet: yes

lastgenre:
force: yes
keep_existing: no```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `beet -vv im .` with the `musicbrainz` plugin and the release ID `1445701d-2b65-45ea-9e1d-67f15f049ed3`. The payload names no source files or tests, so trace the verbose MusicBrainz lookup and candidate extraction first. Done means the specified release is returned with its associated tracks instead of `No tracks` and `No matching release found`.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.