Beets keeps crashing if processing double files?

hey everyone,
first i wanna say thank you for this awesome tool! i got more than 1 000 000 files to process with beets and started to create a config…
i copy pasted some stuff into my conf and also add my own requirements to it…but somehow it seems to crash sometimes.
i looked then into the source folder and noticed double files cause some of these issues but it still crashes sometimes, heres one of these crashes

Traceback (most recent call last):
File “/usr/local/bin/beet”, line 11, in
File “/usr/local/lib/python2.7/dist-packages/beets/ui/”, line 1256, in main
File “/usr/local/lib/python2.7/dist-packages/beets/ui/”, line 1243, in _raw_main
subcommand.func(lib, suboptions, subargs)
File “/usr/local/lib/python2.7/dist-packages/beets/ui/”, line 934, in import_func
import_files(lib, paths, query)
File “/usr/local/lib/python2.7/dist-packages/beets/ui/”, line 911, in import_files
File “/usr/local/lib/python2.7/dist-packages/beets/”, line 325, in run
File “/usr/local/lib/python2.7/dist-packages/beets/util/”, 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/”, line 312, in run
out = self.coro.send(msg)
File “/usr/local/lib/python2.7/dist-packages/beets/util/”, line 194, in coro
func(*(args + (task,)))
File “/usr/local/lib/python2.7/dist-packages/beets/”, line 1440, in plugin_stage
File “/usr/local/lib/python2.7/dist-packages/beets/”, line 807, in reload
File “/usr/local/lib/python2.7/dist-packages/beets/dbcore/”, line 409, in load
assert stored_obj is not None, u"object {0} not in DB".format(
AssertionError: object 532 not in DB

My config looks actually like this…
maybee there are just some uneeded copy paste errors?!

indent preformatted text by 4 spaces`directory: /mnt/media/Audio/Musick/
library: ~/.config/beets/library.blb

copy: yes
move: no
write: yes
timid: no
languages: en
quiet: no
duplicate_action: remove
per_disc_numbering: yes
default_action: apply
autotag: yes
quiet_fallback: skip
singletons: no
group_albums: no
pretend: no
flat: no
detail: no
incremental: no
none_rec_action: ask

clutter: [Thumbs.DB, .DS_Store]
- .*
- '*~'
- System Volume Information
- lost+found
ignore_hidden: yes

plugins: the inline fetchart mbsync web discogs bandcamp duplicates lastgenre ipfs lastgenre edit info permissions

format_item: $artist - $album - $title
format_album: $album
time_format: '%d-%m-%Y %H:%M:%S'
format_raw_length: no

sort_album: albumartist+ album+
sort_item: artist+ album+ disc+ track+
sort_case_insensitive: yes
isMultiDisc: |
    u'yes' if
        (int(disctotal) > 1) and (disctotal != '')
   default:  $albumartist/$album%aunique{album, albumartist}/%if{$isMultiDisc,CD-$disc/}$albumartist - $album%aunique{} - $track $title
singleton: singles/$artist - Singles/$title
comp: compilations/$album%aunique{album, albumartist}/%if{$isMultiDisc,CD-$disc/}$albumartist - $album%aunique{} - $track $title
genre:soundtrack: Soundtracks/$album%aunique{album, albumartist}/%if{$isMultiDisc,CD-$disc/}$track $title
albumtype:audiobook: AudioBooks/$artist/$album/$track $title


strong_rec_thresh: 0.04
medium_rec_thresh: 0.25
rec_gap_thresh: 0.25
    missing_tracks: medium
    unmatched_tracks: medium
    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
    countries: []
    media: []
    original_year: no
ignored: []
required: []
track_length_grace: 10
track_length_max: 30

lyrics: true
art: true

ratelimit: 1
ratelimit_interval: 1.0
searchlimit: 5
user: n1ete
pass: ********

auto: no

auto: no

force: no
source: track

file: 644
dir: 755

'/': '⧸'
'\\': ⧵
#2223: DIVIDES
'\|': ∣
'<': ˂
'>': ˃
'\s+$': ''
'^\s+': ''
#replace : with ։ (lookalike)
'\:': ։
#replace " with two single apostrophes ''
"\"": "''"
'\“': "''"
'\”': "''"
'[\*]': ✶
'[\?]': ?
#elipses are a bit annoying but this way avoids ending filenames with "."
'[\.]{3}$': …
#this might cause issues. looks like it can activate right-to-left text mode (further testing needed)
#'^\.': ܂
#hopefully exclude DEL ␡ from the next Regex
'␡': '␡'
#control characters including Delete (DEL) ␡, see previous rule.
#should just exclude '[\x00-\x1f]'.
#commented out because it interpreted the end of every filename before the extension as a
#control character. maybe this is because of "end of text" (U+0003)?
#'[\x00-\x1f]': _

#"You can now customize the character substituted for path separators (e.g., /) in filenames via path_sep_replace.         The default is an underscore. Use this setting with caution."
#do this for replacing "/" in paths, i.e., in album titles
#one would think this also makes the path seperator change from "/" but I have not found this to be the case. No issues on Windows thus far.
#path_sep_replace: '⧸'

color: yes
    text_success: green
    text_warning: yellow
    text_error: red
    text_highlight: magenta
    text_highlight_minor: brown
    action_default: cyan
    action: green

 #avoid conflicts with existing files like "cover.jpg" "front.jpg" etc.
art_filename: 'covauto'

#uses art_filename (see above)
#Pick only trusted album art by ignoring filenames that do not contain one of the keywords in cover_names. Default: no.
#does this do anything if we are skipping "filesystem" next line?
cautious: yes
#skip filesystem; it causes conflicts (hard stops in beets import) when used alongside copyartifacts
#some of the latter items require API keys which are not configured. as such, they will not work (harmlessly fail) if you just use this config as-is
sources: coverart amazon albumart wikipedia google fanarttv

would love some help to optimize my config… ;D

Huh! This does look like a problem. Is it possible to reproduce the crash reliably? If so, can you please file a bug on the issue tracker with instructions to trigger the problem locally? Then we can look into a fix.

1 Like

i can reproduce it, but the strange thing is: if i run it in -vv mode this error doesnt occure?!
even all the questions about album matches doesnt show up… why?
and in verbose mode there apear no cleaned up files in the music lib dir from beets

The verbose output can bury the importer prompts under a mountain of text. They’re there, but you may need to scroll up to find them.

sure it does, but shouldn’t it create the same output files as a normal run without verbose? and shouldn’t it crash at the the same point as it does like before?

Probably! That’s certainly strange if it doesn’t.

ok, so i was wrong, i deleted the files and started beets in verbose mode, just to see that some files where created…and then suddenly stoped with no error…
i looked at the files where the import stoped and found an “#” in one of the filenames…but deleting it didnt helped either,
stopped at the same point…