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
sys.exit(main())
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 934, in import_func
import_files(lib, paths, query)
File “/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py”, line 911, in import_files
session.run()
File “/usr/local/lib/python2.7/dist-packages/beets/importer.py”, line 325, 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 1440, in plugin_stage
task.reload()
File “/usr/local/lib/python2.7/dist-packages/beets/importer.py”, line 807, in reload
item.load()
File “/usr/local/lib/python2.7/dist-packages/beets/dbcore/db.py”, line 409, in load
assert stored_obj is not None, u"object {0} not in DB".format(self.id)
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

import:
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]
ignore:
- .*
- '*~'
- 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
item_fields:
isMultiDisc: |
    u'yes' if
        (int(disctotal) > 1) and (disctotal != '')
    else
        u''
paths:
   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

terminal_encoding:
 'utf_8'

match:
strong_rec_thresh: 0.04
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: []
required: []
track_length_grace: 10
track_length_max: 30

bandcamp:
lyrics: true
art: true

musicbrainz:
host: musicbrainz.org
ratelimit: 1
ratelimit_interval: 1.0
searchlimit: 5
user: n1ete
pass: ********

chrome:
auto: no

ipfs:
auto: no

lastgenre:
force: no
source: track

permissions:
file: 644
dir: 755

replace:
#BIG SOLIDUS
'/': '⧸'
#29FS BIG REVERSE SOLIDUS
'\\': ⧵
#2223: DIVIDES
'\|': ∣
#02C2 MODIFIER LETTER LEFT ARROWHEAD
'<': ˂
#O2C3 MODIFIER LETTER RIGHT ARROWHEAD
'>': ˃
'\s+$': ''
'^\s+': ''
#replace : with ։ (lookalike)
'\:': ։
#replace " with two single apostrophes ''
"\"": "''"
'\“': "''"
'\”': "''"
'[\*]': ✶
'[\?]': ?
#elipses are a bit annoying but this way avoids ending filenames with "."
'[\.]{3}$': …
#0702 SYRIAC SUBLINEAR FULL STOP
#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: '⧸'

ui:
color: yes
colors:
    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'

fetchart:
#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…