Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discogs plugin issue - TypeError: can only join an iterable #5473

Open
Gwouigwoui opened this issue Oct 19, 2024 · 0 comments
Open

Discogs plugin issue - TypeError: can only join an iterable #5473

Gwouigwoui opened this issue Oct 19, 2024 · 0 comments

Comments

@Gwouigwoui
Copy link

Problem

Ran into this problem importing a specific album and also individual tracks of said album. Issue happened both with flac files freshly created from a flac+cue set using foobar, and with existing alac files. I removed all the metadata except title, album and artist, and the issue persisted.

Definitely feels like same issue as #5468.

beet -v import output is

data directory: /home/user/.config/beets
plugin paths:
plexsync: JSON key: ~/beets.json
inline: adding item field multidisc
Sending event: pluginload
library database: /mnt/c/Users/user/Music/musiclibrary.blb
library directory: /mnt/music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /mnt/c/Users/user/Music/À importer/1/Pascal Comelade - Traffic d'abstraction 1.flac
Tagging Pascal Comelade - Traffic d'abstraction
No album ID found.
Search terms: Pascal Comelade - Traffic d'abstraction
Additional search terms: {'media': ''}
Album might be VA: False
Searching for MusicBrainz releases with: {'release': "traffic d'abstraction", 'artist': 'pascal comelade', 'tracks': '1'}
Requesting MusicBrainz release e47d867f-b774-3d59-b6b1-e9dfb28743fa
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_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_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Pascal Comelade - Traffic d’abstraction (e47d867f-b774-3d59-b6b1-e9dfb28743fa)
Computing track assignment...
...done.
Success. Distance: 0.64
Requesting MusicBrainz release bb504020-19d3-401f-9f80-fb12bcc273d6
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_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_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Pascal Comelade - Traffic d’abstraction (bb504020-19d3-401f-9f80-fb12bcc273d6)
Computing track assignment...
...done.
Success. Distance: 0.64
Requesting MusicBrainz release 2d8a4131-9940-4b42-8a75-bc2148b6eb7f
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_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_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: Pascal Comelade - Concepte general de la quincalla catalana (2d8a4131-9940-4b42-8a75-bc2148b6eb7f)
Computing track assignment...
...done.
Success. Distance: 0.83
Requesting MusicBrainz release 786731bf-bb16-499d-ae55-56d48e6d831d
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_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_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: Pascal Comelade - Sentimientos (786731bf-bb16-499d-ae55-56d48e6d831d)
Computing track assignment...
...done.
Success. Distance: 0.84
Requesting MusicBrainz release 4b0b5b70-844b-4a73-96fb-898b2abe4959
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_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_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: Pascal Comelade - Sentimientos (4b0b5b70-844b-4a73-96fb-898b2abe4959)
Computing track assignment...
...done.
Success. Distance: 0.84
discogs: Searching for master release 53233
discogs: Searching for master release 53233
discogs: Searching for master release 53233
Traceback (most recent call last):
  File "/home/user/.venv/bin/beet", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/user/.venv/lib/python3.12/site-packages/beets/ui/__init__.py", line 1865, in main
    _raw_main(args)
  File "/home/user/.venv/lib/python3.12/site-packages/beets/ui/__init__.py", line 1852, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/user/.venv/lib/python3.12/site-packages/beets/ui/commands.py", line 1395, in import_func
    import_files(lib, paths, query)
  File "/home/user/.venv/lib/python3.12/site-packages/beets/ui/commands.py", line 1326, in import_files
    session.run()
  File "/home/user/.venv/lib/python3.12/site-packages/beets/importer.py", line 360, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/home/user/.venv/lib/python3.12/site-packages/beets/util/pipeline.py", line 447, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/home/user/.venv/lib/python3.12/site-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/user/.venv/lib/python3.12/site-packages/beets/util/pipeline.py", line 195, in coro
    func(*(args + (task,)))
  File "/home/user/.venv/lib/python3.12/site-packages/beets/importer.py", line 1497, in lookup_candidates
    task.lookup_candidates()
  File "/home/user/.venv/lib/python3.12/site-packages/beets/importer.py", line 688, in lookup_candidates
    artist, album, prop = autotag.tag_album(
                          ^^^^^^^^^^^^^^^^^^
  File "/home/user/.venv/lib/python3.12/site-packages/beets/autotag/match.py", line 548, in tag_album
    for matched_candidate in hooks.album_candidates(
  File "/home/user/.venv/lib/python3.12/site-packages/beets/plugins.py", line 593, in decorated
    for v in generator(*args, **kwargs):
  File "/home/user/.venv/lib/python3.12/site-packages/beets/autotag/hooks.py", line 759, in album_candidates
    yield from plugins.candidates(items, artist, album, va_likely, extra_tags)
  File "/home/user/.venv/lib/python3.12/site-packages/beets/plugins.py", line 390, in candidates
    yield from plugin.candidates(
               ^^^^^^^^^^^^^^^^^^
  File "/home/user/.venv/lib/python3.12/site-packages/beetsplug/discogs.py", line 188, in candidates
    return self.get_albums(query)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.venv/lib/python3.12/site-packages/beetsplug/discogs.py", line 335, in get_albums
    return [
           ^
  File "/home/user/.venv/lib/python3.12/site-packages/beetsplug/discogs.py", line 419, in get_album_info
    ", ".join(result.data["formats"][0].get("descriptions", []))
TypeError: can only join an iterable

Setup

  • OS: Ubuntu 24.04 using WSL (Windows 11)
  • Python version: 3.12.3
  • beets version: 2.0.0
  • Turning off plugins made problem go away (yes/no): yes (problem goes away with discogs plugin off)

My configuration (output of beet config) is:

    bing_lang_from: []
    auto: yes
    google_API_key: REDACTED
    sources: google lyricwiki genius
    bing_client_secret: REDACTED
    bing_lang_to:
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no
    synced: no
    dist_thresh: 0.1
directory: /mnt/music
# --------------- Main ---------------

library: /mnt/c/Users/user/Music/musiclibrary.blb

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

per_disc_numbering: yes

# --------------- Performance ---------------

threaded: yes
original_date: no
va_name: Artistes divers

import:
    write: yes
    copy: no
    move: no
    resume: ask
    incremental: yes
    languages: fr en
    bell: yes

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

plugins:
- filetote
- importreplace
- stylize
- discogs
- inline
- info
- fromfilename
- fetchart
- edit
- embedart
- ftintitle
- lastimport
- lyrics
- badfiles
- plexupdate
- duplicates
- missing
- artistcountry
- autogenre
- lastgenre
- xtractor
- plexsync
- summarize
- chroma
- replaygain
replace:
    '[<>:\?\*\|]': _
    \": _
    '[\\/]': _
    ^\.: _
    \.$: _
    '[\x00-\x1f]': _
    ^-: _
    \s+$: ''
    ^\s+: ''
item_fields:
    multidisc: 1 if disctotal > 1 else 0
paths:
    default: $albumartist/$album%aunique{albumartist album,label albumdisambig releasegroupdisambig,[]}/%if{$multidisc,$disc-}$track $title
    singleton: $artist/Album inconnu/$title
    comp: Compilations/$album%aunique{}/%if{$multidisc,$disc-}$track $title

ui:
    color: yes
    colors:
        album: [blue, bold]
        albumartist: [yellow]
        artist: [bold, yellow]
        title: [normal]

# --------------- Search ---------------

format_item: '%stylize{artist,$artist} %nocolor{- }%stylize{album,$album} %nocolor{- }%stylize{title,$title}'
format_album: '%stylize{albumartist,$albumartist} %nocolor{- }%stylize{album,$album}'
plex:
    host: 192.168.2.10
    port: 32400
    token: REDACTED
    library_name: Musique
    secure: no
    ignore_cert_errors: no
openai:
    api_key: REDACTED
    model: gpt-3.5-turbo
google:
    model: gemini-pro
    api_key: REDACTED
    service_json: ~/beets.json
ftintitle:
    auto: yes
    format: (feat. {0})
    drop: no
replaygain:
    backend: ffmpeg
    overwrite: no
    auto: yes
    threads: 16
    parallel_on_import: no
    per_disc: no
    peak: 'true'
    targetlevel: 89
    r128: [Opus]
    r128_targetlevel: 84
missing:
    format: $albumartist - $album - $title
    count: yes
    total: no
    album: no
chroma:
    auto: yes
bpmanalyser:
    auto: yes
    dry-run: no
    write: yes
    threads: AUTO
    force: no
    quiet: no
acoustid:
    apikey: REDACTED
badfiles:
    check_on_import: no
    commands:
        ogg: myoggchecker --opt1 --opt2
        flac: flac --test --warnings-as-errors --silent
        m4a: ffmpeg -v error -f null - -i
        mp4: ffmpeg -v error -f null - -i
fetchart:
    auto: yes
    minwidth: 500
    maxwidth: 0
    quality: 0
    max_filesize: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    - cover_art_url
    store_source: no
    high_resolution: no
    deinterlace: no
    cover_format:
    lastfm_key: REDACTED
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
importreplace:
    replacements: [{item_fields: title artist artist_sort artist_credit, album_fields: album artist artist_sort artist_credit, replace: {'[\u0027]': "\u2019"}}]
extrafiles:
    patterns:
        all: '*.*'
        artworkdir:
        - '[sS]cans/'
        - '[sS]can/'
        - '[aA]rtwork/'
        - '[aA]rt/'
        - '[cC]over/'
        artworkfiles:
        - '*.png'
        - '*.jpg'
        - '*.jpeg'
        - '*.gif'
        - '*.pdf'
        datafiles: ['*.log', '*.cue', '*.CUE']
    paths:
        artworkdir: $albumpath/Artwork
        datafiles: $albumpath/Data/$filename
        artworkfiles: $albumpath/Artwork/$filename
musicbrainz:
    extra_tags: media
filetote:
    extensions: .cue .log .txt
    pairing:
        enabled: yes
        pairing_only: no
        extensions: .*
    paths:
        ext:.log: $albumpath/$artist - $album%if{$multidisc, CD $disc}
        ext:.cue: $albumpath/$artist - $album%if{$multidisc, CD $disc}
        paired_ext:.lrc: $albumpath/$medianame_new
        pattern:artworkdir: $albumpath/artwork/$old_filename
    patterns:
        artworkdir:
        - '[sS]cans/'
        - '[sS]can/'
        - '[aA]rtwork/'
        - '[aA]rt/'
        - '[cC]over/'
    session:
        operation:
        beets_lib:
        import_path:
    filenames: ''
    exclude: ''
    print_ignored: no
lastfm:
    user: ''
    api_key: REDACTED
lastimport:
    per_page: 500
    retry_limit: 3
autogenre:
    auto: no
    pretend: no
    all: no
    force: no
    lastgenre: yes
    xtractor: yes
    from_title: yes
    parent_genres: yes
    genre_rosamerica_strong: 0.8
    genre_electronic_strong: 0.8
    genre_electronic_prepend: 0.5
    genre_electronic_append: 0.45
lastgenre:
    whitelist: yes
    min_weight: 10
    count: 1
    fallback:
    canonical: no
    source: album
    force: yes
    auto: yes
    separator: ', '
    prefer_specific: no
    title_case: yes
pathfields: {}
album_fields: {}
duplicates:
    album: no
    checksum: ''
    copy: ''
    count: no
    delete: no
    format: ''
    full: no
    keys: []
    merge: no
    move: ''
    path: no
    tiebreak: {}
    strict: no
    tag: ''
embedart:
    maxwidth: 0
    auto: yes
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    quality: 0
plexsync:
    tokenfile: spotify_plexsync.json
    manual_search: no
discogs:
    apikey: REDACTED
    apisecret: REDACTED
    tokenfile: discogs_token.json
    source_weight: 0.5
    user_token: REDACTED
    separator: ', '
    index_tracks: no
    append_style_genre: no
edit:
    albumfields: album albumartist
    itemfields: track title artist album
    ignore_fields: id path
xtractor:
    auto: no
    dry-run: no
    write: yes
    threads: 1
    force: no
    quiet: no
    keep_output: no
    keep_profiles: no
    low_level_targets:
        bpm:
            path: rhythm.bpm
            type: integer
            required: yes
        danceability:
            path: rhythm.danceability
            type: float
        beats_count:
            path: rhythm.beats_count
            type: integer
        average_loudness:
            path: lowlevel.average_loudness
            type: float
            required: yes
    high_level_targets:
        danceable:
            path: highlevel.danceability.all.danceable
            type: float
            required: yes
        gender:
            path: highlevel.gender.value
            type: string
            required: yes
        is_male:
            path: highlevel.gender.all.male
            type: float
        is_female:
            path: highlevel.gender.all.female
            type: float
        genre_rosamerica:
            path: highlevel.genre_rosamerica.value
            type: string
            required: yes
        voice_instrumental:
            path: highlevel.voice_instrumental.value
            type: string
            required: yes
        is_voice:
            path: highlevel.voice_instrumental.all.voice
            type: float
        is_instrumental:
            path: highlevel.voice_instrumental.all.instrumental
            type: float
        mood_acoustic:
            path: highlevel.mood_acoustic.all.acoustic
            type: float
            required: yes
        mood_aggressive:
            path: highlevel.mood_aggressive.all.aggressive
            type: float
            required: yes
        mood_electronic:
            path: highlevel.mood_electronic.all.electronic
            type: float
            required: yes
        mood_happy:
            path: highlevel.mood_happy.all.happy
            type: float
            required: yes
        mood_sad:
            path: highlevel.mood_sad.all.sad
            type: float
            required: yes
        mood_party:
            path: highlevel.mood_party.all.party
            type: float
            required: yes
        mood_relaxed:
            path: highlevel.mood_relaxed.all.relaxed
            type: float
            required: yes
        mood_mirex:
            path: highlevel.moods_mirex.value
            type: string
            required: yes
        mood_mirex_cluster_1:
            path: highlevel.moods_mirex.all.Cluster1
            type: float
        mood_mirex_cluster_2:
            path: highlevel.moods_mirex.all.Cluster2
            type: float
        mood_mirex_cluster_3:
            path: highlevel.moods_mirex.all.Cluster3
            type: float
        mood_mirex_cluster_4:
            path: highlevel.moods_mirex.all.Cluster4
            type: float
        mood_mirex_cluster_5:
            path: highlevel.moods_mirex.all.Cluster5
            type: float
    essentia_extractor: /your/path/to/streaming_extractor_music
    extractor_profile:
        outputFormat: json
        outputFrames: 0
        lowlevel:
            frameSize: 2048
            hopSize: 1024
        highlevel:
            compute: 1
            svm_models: [/your/path/to/svm_model.history]
        chromaprint:
            compute: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant