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: TypeError on a specific mp3 file #5468

Open
akinhet opened this issue Oct 18, 2024 · 0 comments
Open

discogs: TypeError on a specific mp3 file #5468

akinhet opened this issue Oct 18, 2024 · 0 comments

Comments

@akinhet
Copy link

akinhet commented Oct 18, 2024

Problem

Running this command in verbose (-vv) mode:

$ beet -v import .

Led to this problem:

user configuration: /home/ubuntu/.config/beets/config.yaml
data directory: /home/ubuntu/.config/beets
plugin paths:
fetchart: google: Disabling art source due to missing key
fetchart: lastfm: Disabling art source due to missing key
fetchart: To use Spotify as an album art source, you must install the beautifulsoup4 module. See the documentation for further details.
lyrics: To use the google lyrics source, you must install the beautifulsoup4 module. See the documentation for further details.
lyrics: To use the genius lyrics source, you must install the beautifulsoup4 module. See the documentation for further details.
lyrics: To use the tekstowo lyrics source, you must install the beautifulsoup4 module. See the documentation for further details.
Sending event: pluginload
library database: /home/ubuntu/.config/beets/library.db
library directory: /home/ubuntu/music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /home/ubuntu/music-todo
Tagging Pin - Muzykoplastyka
No album ID found.
Search terms: Pin - Muzykoplastyka
Album might be VA: False
Searching for MusicBrainz releases with: {'release': 'muzykoplastyka', 'artist': 'pin', 'tracks': '1'}
Requesting MusicBrainz release ce8965d1-b222-4359-a9c5-8722acf23c5e
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: PIN - Muzykoplastyka (ce8965d1-b222-4359-a9c5-8722acf23c5e)
Computing track assignment...
...done.
Success. Distance: 0.59
Requesting MusicBrainz release deb2dd33-b827-4925-b32d-f837d7c447ae
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: PIN - Film O Sobie (deb2dd33-b827-4925-b32d-f837d7c447ae)
Computing track assignment...
...done.
Success. Distance: 0.77
Requesting MusicBrainz release aa9da518-ed2a-4077-83fb-3d96ecd5c88e
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: PIN - 0001 (aa9da518-ed2a-4077-83fb-3d96ecd5c88e)
Computing track assignment...
...done.
Success. Distance: 0.76
Requesting MusicBrainz release 01653981-4665-48aa-9bb4-2629ea028175
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: Pin Pin Sugar - Latex Duellos (01653981-4665-48aa-9bb4-2629ea028175)
Computing track assignment...
...done.
Success. Distance: 0.92
Requesting MusicBrainz release b4be9fc8-b523-41ab-9e94-0d8a059dd33d
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Pin-Up - Üretim Hatası (b4be9fc8-b523-41ab-9e94-0d8a059dd33d)
Computing track assignment...
...done.
Success. Distance: 0.63
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/beets/ui/__init__.py", line 1865, in main
    _raw_main(args)
  File "/usr/local/lib/python3.10/dist-packages/beets/ui/__init__.py", line 1852, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python3.10/dist-packages/beets/ui/commands.py", line 1395, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python3.10/dist-packages/beets/ui/commands.py", line 1326, in import_files
    session.run()
  File "/usr/local/lib/python3.10/dist-packages/beets/importer.py", line 360, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/local/lib/python3.10/dist-packages/beets/util/pipeline.py", line 447, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/usr/local/lib/python3.10/dist-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
  File "/usr/local/lib/python3.10/dist-packages/beets/util/pipeline.py", line 195, in coro
    func(*(args + (task,)))
  File "/usr/local/lib/python3.10/dist-packages/beets/importer.py", line 1497, in lookup_candidates
    task.lookup_candidates()
  File "/usr/local/lib/python3.10/dist-packages/beets/importer.py", line 688, in lookup_candidates
    artist, album, prop = autotag.tag_album(
  File "/usr/local/lib/python3.10/dist-packages/beets/autotag/match.py", line 548, in tag_album
    for matched_candidate in hooks.album_candidates(
  File "/usr/local/lib/python3.10/dist-packages/beets/plugins.py", line 593, in decorated
    for v in generator(*args, **kwargs):
  File "/usr/local/lib/python3.10/dist-packages/beets/autotag/hooks.py", line 759, in album_candidates
    yield from plugins.candidates(items, artist, album, va_likely, extra_tags)
  File "/usr/local/lib/python3.10/dist-packages/beets/plugins.py", line 390, in candidates
    yield from plugin.candidates(
  File "/usr/local/lib/python3.10/dist-packages/beetsplug/discogs.py", line 188, in candidates
    return self.get_albums(query)
  File "/usr/local/lib/python3.10/dist-packages/beetsplug/discogs.py", line 335, in get_albums
    return [
  File "/usr/local/lib/python3.10/dist-packages/beetsplug/discogs.py", line 335, in <listcomp>
    return [
  File "/usr/local/lib/python3.10/dist-packages/beetsplug/discogs.py", line 419, in get_album_info
    ", ".join(result.data["formats"][0].get("descriptions", []))
TypeError: can only join an iterable

This is the output of $ id3 -l Niekochanie.mp3:

Niekochanie.mp3:
Title  : Niekochanie                     Artist: Pin
Album  : Muzykoplastyka                  Year: 2017, Genre: Unknown (255)
Comment: https://www.youtube.com/watch?

Here's a link to the music files that trigger the bug (if relevant):
https://files.catbox.moe/sf254n.mp3

Issue seems related to #4973 but as you can see both artist and album fields are not empty.

Also the issue is persistent on both 2.0.0 and 1.6.0 versions of beets.

Setup

  • OS: Ubuntu 20.04
  • Python version: 3.10.12
  • beets version: 2.0.0
  • Turning off plugins made problem go away (yes/no): yes discogs

My configuration (output of beet config) is:

lyrics:
    bing_lang_from: []
    auto: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no
    synced: no
    sources:
    - google
    - genius
    - tekstowo
    - lrclib
    dist_thresh: 0.1
directory: /home/ubuntu/music/

ui:
    color: yes

import:
    write: yes
    copy: yes
    move: no
    resume: ask

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

plugins: fetchart fromfilename lyrics lastgenre
discogs:
    user_token: vIGJEZxYkpgThqylUetOPDGhIqJABEawpxDkSPLC
fetchart:
    maxwidth: 500
    enforce_ratio: 15%
    auto: yes
    minwidth: 0
    quality: 0
    max_filesize: 0
    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:
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    lastfm_key: REDACTED
lastgenre:
    whitelist: yes
    min_weight: 10
    count: 1
    fallback:
    canonical: no
    source: album
    force: yes
    auto: yes
    separator: ', '
    prefer_specific: no
    title_case: yes
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