beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.77k stars 1.82k forks source link

Discogs traceback error? #3664

Closed Chris230291 closed 4 years ago

Chris230291 commented 4 years ago

Hello. When the tagger is running I get the following error.

Traceback (most recent call last):
  File "/usr/bin/beet", line 11, in <module>
    load_entry_point('beets==1.4.9', 'console_scripts', 'beet')()
  File "/usr/lib/python3.8/site-packages/beets/ui/__init__.py", line 1266, in main
    _raw_main(args)
  File "/usr/lib/python3.8/site-packages/beets/ui/__init__.py", line 1253, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/lib/python3.8/site-packages/beets/ui/commands.py", line 955, in import_func
    import_files(lib, paths, query)
  File "/usr/lib/python3.8/site-packages/beets/ui/commands.py", line 925, in import_files
    session.run()
  File "/usr/lib/python3.8/site-packages/beets/importer.py", line 329, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 445, in run_parallel
    six.reraise(exc_info[0], exc_info[1], exc_info[2])
  File "/usr/lib/python3.8/site-packages/six.py", line 703, in reraise
    raise value
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 194, in coro
    func(*(args + (task,)))
  File "/usr/lib/python3.8/site-packages/beets/importer.py", line 1351, in lookup_candidates
    task.lookup_candidates()
  File "/usr/lib/python3.8/site-packages/beets/importer.py", line 641, in lookup_candidates
    autotag.tag_album(self.items, search_ids=self.search_ids)
  File "/usr/lib/python3.8/site-packages/beets/autotag/match.py", line 461, in tag_album
    _add_candidate(items, candidates, matched_candidate)
  File "/usr/lib/python3.8/site-packages/beets/autotag/match.py", line 377, in _add_candidate
    dist = distance(items, info, mapping)
  File "/usr/lib/python3.8/site-packages/beets/autotag/match.py", line 202, in distance
    diff = abs(album_info.year - original)
TypeError: unsupported operand type(s) for -: 'list' and 'int'

My configuration (output of beet config) is:

plugins: fetchart embedart convert scrub lastgenre chroma web ftintitle embedart mbsync follow beatport spotify discogs
directory: /music
library: /config/musiclibrary.blb
art_filename: albumart
threaded: yes
original_date: no
per_disc_numbering: no

match:
    strong_rec_thresh: 0.25
    preferred:
        countries: [GB|UK, US]
        media: [CD, Digital Media|File]
        original_year: yes
convert:
    auto: no
    ffmpeg: /usr/bin/ffmpeg
    opts: -ab 320k -ac 2 -ar 48000
    max_bitrate: 320
    threads: 1
    dest:
    pretend: no
    format: mp3
    id3v23: inherit
    formats:
        aac:
            command: ffmpeg -i $source -y -vn -acodec aac -aq 1 $dest
            extension: m4a
        alac:
            command: ffmpeg -i $source -y -vn -acodec alac $dest
            extension: m4a
        flac: ffmpeg -i $source -y -vn -acodec flac $dest
        mp3: ffmpeg -i $source -y -vn -aq 2 $dest
        opus: ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest
        ogg: ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest
        wma: ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest
    tmpdir:
    quiet: no
    embed: yes

    paths: {}
    no_convert: ''
    never_convert_lossy_files: no
    copy_album_art: no
    album_art_maxwidth: 0

paths:
    default: $albumartist/$album%aunique{} ($year)/$track - $title
    singleton: Non-Album/$artist - $title
    comp: Compilations/$album%aunique{}  ($year)/$track - $title
    albumtype_soundtrack: Soundtracks/$album  ($year)/$track $title

import:
    write: yes
    copy: no
    move: yes
    resume: ask
    incremental: yes
    quiet_fallback: skip
    timid: no
    log: /config/beet.log
lastgenre:
    auto: yes
    source: album
    whitelist: yes
    min_weight: 10
    count: 1
    fallback:
    canonical: no
    force: yes
    separator: ', '
    prefer_specific: no
embedart:
    remove_art_file: yes
    maxwidth: 0
    auto: yes
    compare_threshold: 0
    ifempty: no
fetchart:
    auto: yes
    minwidth: 0
    maxwidth: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    store_source: no
replaygain:
    auto: yes
    overwrite: yes
scrub:
    auto: yes

replace:
    ^\.: _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '[\xE8-\xEB]': e
    '[\xEC-\xEF]': i
    '[\xE2-\xE6]': a
    '[\xF2-\xF6]': o
    '[\xF8]': o
    \.$: _
    \s+$: ''
web:
    host: 0.0.0.0
    port: 8337
    cors: ''
    cors_supports_credentials: no
    reverse_proxy: no
    include_paths: no
discogs:
    source_weight: 0.0
beatport:
    source_weight: 0.01
    apikey: REDACTED
    apisecret: REDACTED
    tokenfile: beatport_token.json
spotify:
    source_weight: 0.02
    mode: list
    tiebreak: popularity
    show_failures: no
    artist_field: albumartist
    album_field: album
    track_field: title
    region_filter:
    regex: []
    client_id: 4e414367a1d14c75a5c5129a627fcab8
    client_secret: REDACTED
    tokenfile: spotify_token.json
deezer:
    source_weight: 0.03
ftintitle:
    auto: yes
    drop: no
    format: feat. {0}
follow:
    email: REDACTED
    password: REDACTED
    userid: REDACTED
    auto: no
chroma:
    auto: yes

Any ideas?

Thanks, Chris

jackwilsdon commented 4 years ago

It looks like you haven't attached the error to your original post?

Chris230291 commented 4 years ago

woops. Just added it, thanks

jackwilsdon commented 4 years ago

Could you please provide the full command you ran and the output with beets in verbose mode? (e.g. beet -vvv import ...)

Chris230291 commented 4 years ago

Right, sorry for the delay but it has been running away with no issues. I have disabled deezer, replaygain and spotify... I think the issue is with the spotify plugin. I have always had the deezer plugin disabled because that causes issues for sure. Its still running now.

I can live without the spotify plugin.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

alfureu commented 3 years ago

reopening this, as I have exactly the same error, running beets in docker and the ticket got closed by a bot...

Plugins used: chroma copyartifacts discogs edit embedart fetchart fromfilename fuzzy info inline lastgenre mbsync replaygain scrub web zero

libraryjim commented 2 years ago

I have this problem when using the spotify module. The problem isn't consistent. I am attaching a file showing output from "beet -vvv import ..."

Plugins enabled: embyupdate info spotify

spotify_error_2022-02-20.txt

Let me know if you need anymore information.

sampsyo commented 2 years ago

Interesting! Even if it's not consistent for every album, can you force it to happen by using the same album match from Spotify?