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

Import failing #3252

Closed
lbesnard opened this issue May 6, 2019 · 3 comments
Closed

Import failing #3252

lbesnard opened this issue May 6, 2019 · 3 comments

Comments

@lbesnard
Copy link

lbesnard commented May 6, 2019

The import of an album is failing using discogs. Never had that one before

Problem

Running this command in verbose (-vv) mode:

beet import -vv *

Led to this problem:


Reimported item added 1557113713.17 from item 225672 for /export/torrent/BEET_IMPORT/25/Various - Evolution Of Dub Series/Evolution Of Dub Volume 1 - The Orig│···············································································
in Of The Species/CD2 King Tubby Dub Master Presents - Dub From The Roots/11-Stealing.flac                                                                    │···············································································
Reimported item flexible attributes [u'track_alt', u'data_source'] from item 225672 for /export/torrent/BEET_IMPORT/25/Various - Evolution Of Dub Series/Evolu│···············································································
tion Of Dub Volume 1 - The Origin Of The Species/CD2 King Tubby Dub Master Presents - Dub From The Roots/11-Stealing.flac                                     │···············································································
Sending event: database_change                                                                                                                                │···············································································
Traceback (most recent call last):                                                                                                                            │···············································································
  File "/usr/local/bin/beet", line 11, in <module>                                                                                                            │···············································································
    load_entry_point('beets==1.4.7', 'console_scripts', 'beet')()                                                                                             │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1256, in main                                                                      │···············································································
    _raw_main(args)                                                                                                                                           │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1243, in _raw_main                                                                 │···············································································
    subcommand.func(lib, suboptions, subargs)                                                                                                                 │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 943, in import_func                                                                │···············································································
    import_files(lib, paths, query)                                                                                                                           │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 913, in import_files                                                               │···············································································
    session.run()                                                                                                                                             │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 329, in run                                                                           │···············································································
    pl.run_parallel(QUEUE_SIZE)                                                                                                                               │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 445, in run_parallel                                                             │···············································································
    six.reraise(exc_info[0], exc_info[1], exc_info[2])                                                                                                        │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 312, in run                                                                      │···············································································
    out = self.coro.send(msg)                                                                                                                                 │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 194, in coro                                                                     │···············································································
    func(*(args + (task,)))                                                                                                                                   │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 1351, in lookup_candidates                                                            │···············································································
    task.lookup_candidates()                                                                                                                                  │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 641, in lookup_candidates                                                             │···············································································
    autotag.tag_album(self.items, search_ids=self.search_ids)                                                                                                 │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/autotag/match.py", line 460, in tag_album                                                                │···············································································
    va_likely):                                                                                                                                               │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/plugins.py", line 561, in decorated                                                                      │···············································································
    for v in generator(*args, **kwargs):                                                                                                                      │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/autotag/hooks.py", line 610, in album_candidates                                                         │···············································································
    for candidate in plugins.candidates(items, artist, album, va_likely):                                                                                     │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beets/plugins.py", line 371, in candidates                                                                     │···············································································
    for candidate in plugin.candidates(items, artist, album, va_likely):                                                                                      │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beetsplug/discogs.py", line 151, in candidates                                                                 │···············································································
    return self.get_albums(query)                                                                                                                             │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beetsplug/discogs.py", line 216, in get_albums                                                                 │···············································································
    return [album for album in map(self.get_album_info, releases[:5])                                                                                         │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beetsplug/discogs.py", line 303, in get_album_info                                                             │···············································································
    original_year = self.get_master_year(master_id) if master_id else year                                                                                    │···············································································
  File "/usr/local/lib/python2.7/dist-packages/beetsplug/discogs.py", line 230, in get_master_year                                                            │···············································································
    self._log.debug(u'API Error: {0} (query: {1})', e, result._uri)                                                                                           │···············································································
AttributeError: 'Master' object has no attribute '_uri'                              

Setup

  • OS: debian
  • Python version
  • beets version: latest release

My configuration (output of ``) is:

play:
    command: mp3blaster --list
    use_folders: no
    raw: no
    warning_threshold: 100
    relative_to:
scrub:
    auto: yes
badfiles:
    commands: {}
rewrite:
    artist The Jimi Hendrix Experience: Jimi Hendrix
    albumartist The Jimi Hendrix Experience: Jimi Hendrix
    artist .*Grateful Dead.*: Grateful Dead
    albumartist .*Grateful Dead.*: Grateful Dead
    artist .*Bill Monroe.*: Bill Monroe
    albumartist .*Bill Monroe.*: Bill Monroe
duplicates:
    album: yes
    path: yes
    count: no
    full: no
    format: ''
    keys: []
    move: ''
    tag: ''
    copy: ''
    tiebreak: {}
    strict: no
    checksum: ''
    merge: no
    delete: no
library: ~/musiclibrary2.blb

replace:
    '[\\/]': _
    ^\.:
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    \.$: _
    \s+$: ''
    ^\s+: ''
ftintitle:
    auto: yes
    drop: no
    format: feat. {0}
pluginpath: [~/github_repo/dotfiles/beets, ~/github_repo/dotfiles/beets/bandcamp/beetsplug]

plugins: info rewrite fetchart badfiles inline convert web lastgenre play fromfilename duplicates acousticbrainz discogs mbsync cmus smartplaylist artistcountry the fuzzy random web scrub ftintitle

import:
    copy: no
    move: yes
    write: yes
    languages: en
    resume: yes
    autotag: yes
acousticbrainz:
    auto: yes
    force: no
    tags: []
sort_item: albumartist+ album+ disc+ track+
paths:
    default: '%title{$genre}/%the{%title{$albumartist}}/$original_year - $album/%if{$multidisc,Disc $disc/}$track $title'
    albumtype:soundtrack: Soundtracks/$albumartist - $original_year - $album/%if{$multidisc,Disc $disc/}$track $title
    singleton: '%the{$albumartist}/$year -  $album/$track $title'
    mis:1: '%the{$albumartist}/$year - $album/$track $title'
threaded: yes
item_fields:
    multidisc: 1 if disctotal > 1 else 0
per_disc_numbering: yes
smartplaylist:
    playlist_dir: ~/playlists
    playlists: [{name: all.m3u, query: ''}, {name: vivaldi.m3u, query: kennedy}]
    auto: yes
    relative_to:
fetchart:
    auto: yes
    maxwidth: 1000
    cover_names: cover Cover front Front art album portada folder Folder
    sources: filesystem coverart amazon albumart google
    minwidth: 0
    google_engine: 001442825323518660753:hrh5ch1gjzm
    enforce_ratio: no
    cautious: no
    store_source: no
    google_key: REDACTED
    fanarttv_key: REDACTED
chroma:
    auto: yes

ui:
    color: yes
    text_success: green
    text_warning: yellow
    text_error: red
    text_highlight: red
    text_highlight_minor: lightgray
    action_default: turquoise
    action: blue
path_sep_replace: _
directory: /media/lbesnard/music/music_library2
lastgenre:
    auto: yes
    fallback: unknown
    source: artist
    canonical: ~/genres-tree.yaml
    whitelist: ~/beets_genre
    count: 1
    prefer_specific: no
    force: yes
    min_weight: 10
    separator: ', '
the:
    the: yes
    a: yes
    format: '{0}, {1}'
    strip: no
    patterns: []

match:                                                                                                                                                                                                                                 [9/136]
    strong_rec_thresh: 0.1
    medium_rec_thresh: 0.25
    rec_gap_thresh: 0.25
    max_rec:
        missing_tracks: medium
        unmatched_tracks: medium
    distance_weights:
        source: 2.0
        artist: 3.0
        album: 3.0
        media: 1.0
        mediums: 1.0
        year: 1.0
        country: 0.5
        label: 0.5
        catalognum: 0.5
        albumdisambig: 0.5
        album_id: 5.0
        tracks: 2.0
        missing_tracks: 0.9
        unmatched_tracks: 0.6
        track_title: 3.0
        track_artist: 2.0
        track_index: 1.0
        track_length: 2.0
        track_id: 5.0
    preferred:
        countries: []
        media: []
        original_year: no
    ignored: []
    track_length_grace: 10
    track_length_max: 30
web:
    cors_supports_credentials: no
    reverse_proxy: no
    host: 127.0.0.1
    include_paths: no
    cors: ''
    port: 8337
convert:
    never_convert_lossy_files: no
    album_art_maxwidth: 0
    format: mp3
    dest:
    auto: no
    threads: 4
    copy_album_art: no
    tmpdir:
    max_bitrate: 500

    paths: {}
    pretend: no
    quiet: no
    formats:
        alac:
            command: ffmpeg -i $source -y -vn -acodec alac $dest
            extension: m4a
        aac:
            command: ffmpeg -i $source -y -vn -acodec aac -aq 1 $dest
            extension: m4a
        opus: ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest
        mp3: ffmpeg -i $source -y -vn -aq 2 $dest
        flac: ffmpeg -i $source -y -vn -acodec flac $dest
        ogg: ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest
        wma: ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest
    embed: yes
    no_convert: ''
discogs:
    tokenfile: discogs_token.json
    user_token: REDACTED
    apikey: REDACTED
    apisecret: REDACTED
    source_weight: 0.5
fuzzy:
    threshold: 0.7
    prefix: '~'
pathfields: {}
album_fields: {}
@lbesnard
Copy link
Author

lbesnard commented May 6, 2019

does the same thing if I directly use the MusicBrainz release url on the import (files are completely untagged)

@sampsyo
Copy link
Member

sampsyo commented May 6, 2019

Please see #2965.

@lbesnard
Copy link
Author

lbesnard commented May 6, 2019

thanks. works well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants