Beets keeps crashing on initial import

I’m running Beets in a Docker container on a Synology NAS. I’m running the command ‘beet import /music’ and it keeps crashing and displaying the following.

Traceback (most recent call last):                                                                                                                                                                                                      
  File "/usr/bin/beet", line 33, in <module>                                                                                                                                                                                            
    sys.exit(load_entry_point('beets==1.5.0', 'console_scripts', 'beet')())                                                                                                                                                             
  File "/usr/lib/python3.8/site-packages/beets/ui/__init__.py", line 1291, in main                                                                                                                                                      
    _raw_main(args)                                                                                                                                                                                                                     
  File "/usr/lib/python3.8/site-packages/beets/ui/__init__.py", line 1278, in _raw_main                                                                                                                                                 
    subcommand.func(lib, suboptions, subargs)                                                                                                                                                                                           
  File "/usr/lib/python3.8/site-packages/beets/ui/commands.py", line 973, in import_func                                                                                                                                                
    pl.run_parallel(QUEUE_SIZE)                                                                                                                                                                                                         
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 442, in run_parallel                                                                                                                                             
    six.reraise(exc_info[0], exc_info[1], exc_info[2])                                                                                                                                                                                  
  File "/usr/lib/python3.8/site-packages/six.py", line 719, in reraise                                                                                                                                                                  
    import_files(lib, paths, query)                                                                                                                                                                                                     
  File "/usr/lib/python3.8/site-packages/beets/ui/commands.py", line 943, in import_files                                                                                                                                               
    session.run()                                                                                                                                                                                                                       
  File "/usr/lib/python3.8/site-packages/beets/importer.py", line 341, in run                                                                                                                                                           
    raise value                                                                                                                                                                                                                         
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 312, in run                                                                                                                                                      
    for msg in _allmsgs(out):                                                                                                                                                                                                           
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 463, in pull                                                                                                                                                     
    out = 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 1370, in lookup_candidates                                                                                                                                            
    plugins.send('import_task_start', session=session, task=task)                                                                                                                                                                       
  File "/usr/lib/python3.8/site-packages/beets/plugins.py", line 498, in send                                                                                                                                                           
    result = handler(**arguments)                                                                                                                                                                                                       
  File "/usr/lib/python3.8/site-packages/beets/plugins.py", line 153, in wrapper                                                                                                                                                        
    return func(*args, **kwargs)                                                                                                                                                                                                        
  File "/usr/lib/python3.8/site-packages/beetsplug/chroma.py", line 182, in fingerprint_task                                                                                                                                            
    return fingerprint_task(self._log, task, session)                                                                                                                                                                                   
  File "/usr/lib/python3.8/site-packages/beetsplug/chroma.py", line 251, in fingerprint_task                                                                                                                                            
    acoustid_match(log, item.path)                                                                                                                                                                                                      
  File "/usr/lib/python3.8/site-packages/beetsplug/chroma.py", line 91, in acoustid_match                                                                                                                                               
    duration, fp = acoustid.fingerprint_file(util.syspath(path))                                                                                                                                                                        
  File "/usr/lib/python3.8/site-packages/acoustid.py", line 340, in fingerprint_file                                                                                                                                                    
    return _fingerprint_file_audioread(path, maxlength)                                                                                                                                                                                 
  File "/usr/lib/python3.8/site-packages/acoustid.py", line 280, in _fingerprint_file_audioread                                                                                                                                         
    with audioread.audio_open(path) as f:                                                                                                                                                                                               
  File "/usr/lib/python3.8/site-packages/audioread/__init__.py", line 111, in audio_open                                                                                                                                                
    return BackendClass(path)                                                                                                                                                                                                           
  File "/usr/lib/python3.8/site-packages/audioread/rawread.py", line 62, in __init__                                                                                                                                                    
    self._fh = open(filename, 'rb')                                                                                                                                                                                                     
FileNotFoundError: [Errno 2] No such file or directory: b'/music/Grateful Dead/Spring 1990 (The Other One)/18-03 Just A Little Light.flac'                                                                                              
root@linuxserver-beets1:/# m                                                                                                                                                                                                            
bash: m: command not found                                                                                                                                                                                                              
root@linuxserver-beets1:/#`Preformatted text`

Here is my config yaml file:

##	Beets configuration-------------------------------------------------------
##	Will 10-28-2021-----------------------------------------------------------
##	Global Options------------------------------------------------------------

# Path to the beets library file. By default, beets will use a file called library.db.
directory: /music

# The directory to which files will be copied/moved when adding them to the library. 
# Defaults to a folder called Music in your home directory.
library: /config/musiclibrary.blb


##	Importer Options----------------------------------------------------------
import:
    # Specifies a filename where the importer’s log should be kept.
    log: /config/beet.log

    # write metadata to music files
    write: yes

    #do not move imported files from source to music directory
    # Either yes or no, indicating whether to copy files into the library directory 
    #when using beet import. Defaults to yes.
    copy: no

    # Either yes or no, indicating whether to move files into the library directory
    # when using beet import. Defaults to no.
    move: yes

    delete:no

    ## use auto-tagging where possible
    ## do not require confirmation on strong matches
    autotag: yes
    # Either yes or no, controlling whether the importer runs in timid mode, in 
    # which it asks for confirmation on every autotagging match, even the ones that 
    #seem very close. Defaults to no.
    timid: no

    # Either yes, no, or ask. Controls whether interrupted imports should be resumed.
    resume: ask

    # Either yes or no, controlling whether imported directories are recorded and 
    # whether these recorded directories are skipped.
    incremental: no

    # Either ask (default), asis or skip. Specifies what should happen during an 
    # interactive import session when there is no recommendation.
    none_rec_action:ask

    # Either yes or no (default), controlling whether to ask for a manual decision 
    # from the user when the importer is unsure how to proceed.
    quiet: no

    # Either skip (default) or asis, specifying what should happen in quiet mode 
    # (see the -q flag to import, above) when there is no strong recommendation.
    quiet_fallback: skip

    # One of apply, skip, asis, or none, indicating which option should be the 
    # default when selecting an action for a given match. The default is apply.
    default_action: apply

    # A list of locale names to search for preferred aliases.
    languages: en

    # Whether the importer UI should show detailed information about each match it 
    # finds. Default: no.
    detail: yes

    ## ??? --flat option. This takes all the music files under the directory
    # (recursively) and treats them as a single large album instead of as one 
    # album per directory.
    flat: no



# use the release-date of the original (first) release of an album?
original_date: no

# on multi-disk releases, assign track numbers for the whole album.
# If "per disk", make sure tracknames do not collide ("paths" setting).
per_disc_numbering: yes

# files matching these patterns are deleted from source after import
clutter: ["Thumbs.DB", ".DS_Store", "*.m3u", ".pls", "*.jpg", "*.m3u", "*.log", "*.cue"]


# files/directories matching one of these patterns are ignored during import
ignore: [".*", "*~", "System Volume Information"]

replace:
    '[\\/]': _
    '^\.': _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '[\xE8-\xEB]': e
    '[\xEC-\xEF]': i
    '[\xE2-\xE6]': a
    '[\xF2-\xF6]': o
    '[\xF8]': o
    '\.$': _
    '^\s+': ''
    '\s+$': ''
    '^-': _

# When importing album art, the name of the file (without extension) where the cover 
# art image should be placed. Defaults to cover (i.e., images will be named cover.jpg or 
# cover.png and placed in the album’s directory).
art_filename: albumart

# Either yes or no, indicating whether the autotagger should use multiple threads.
threaded: yes

# Either yes or no, indicating whether matched albums should have their year, month, 
# and day fields set to the release date of the original version of an album rather 
# than the selected version of the release. Default is no.
original_date: no

##UI Options

# Either yes or no; whether to use color in console output.
color: yes

##	Path Format Configuration

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


plugins: [
    fetchart,
    embedart,
    convert,
    scrub,
    replaygain,
    lastgenre,
    chroma,
    web
    ]

fetchart:
    auto: yes

embedart:
    auto: yes

convert:
    auto: no
    ffmpeg: /usr/bin/ffmpeg
    opts: -ab 320k -ac 2 -ar 48000
    max_bitrate: 320
    threads: 1

scrub:
    auto: yes

replaygain:
    auto: no

lastgenre:
    auto: yes
    source: album

web:
    host: fishbot.asuscomm.com
    port: 8337

Any help would be appreciated.

Hmm; since the error says this:

It would be useful to know some more details about the files involved. Does this file actually exist? Is it the file you were trying to import? Et cetera.

The file did exist although it was called ‘18-03 Just A Little Light.1.flac’. I manually renamed to ‘18-03 Just A Little Light.flac’ and started the import again. Now I’m getting a similar error on another file although manually changing the file name is not working.

Traceback (most recent call last):                                                                                                                                                                                                      
  File "/usr/bin/beet", line 33, in <module>                                                                                                                                                                                            
    sys.exit(load_entry_point('beets==1.5.0', 'console_scripts', 'beet')())                                                                                                                                                             
  File "/usr/lib/python3.8/site-packages/beets/ui/__init__.py", line 1291, in main                                                                                                                                                      
    _raw_main(args)                                                                                                                                                                                                                     
  File "/usr/lib/python3.8/site-packages/beets/ui/__init__.py", line 1278, in _raw_main                                                                                                                                                 
    subcommand.func(lib, suboptions, subargs)                                                                                                                                                                                           
  File "/usr/lib/python3.8/site-packages/beets/ui/commands.py", line 973, in import_func                                                                                                                                                
    import_files(lib, paths, query)                                                                                                                                                                                                     
  File "/usr/lib/python3.8/site-packages/beets/ui/commands.py", line 943, in import_files                                                                                                                                               
    session.run()                                                                                                                                                                                                                       
  File "/usr/lib/python3.8/site-packages/beets/importer.py", line 341, in run                                                                                                                                                           
    pl.run_parallel(QUEUE_SIZE)                                                                                                                                                                                                         
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 442, in run_parallel                                                                                                                                             
    six.reraise(exc_info[0], exc_info[1], exc_info[2])                                                                                                                                                                                  
  File "/usr/lib/python3.8/site-packages/six.py", line 719, in reraise                                                                                                                                                                  
    raise value                                                                                                                                                                                                                         
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 312, in run                                                                                                                                                      
    for msg in _allmsgs(out):                                                                                                                                                                                                           
  File "/usr/lib/python3.8/site-packages/beets/util/pipeline.py", line 463, in pull                                                                                                                                                     
    out = 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 1370, in lookup_candidates                                                                                                                                            
    plugins.send('import_task_start', session=session, task=task)                                                                                                                                                                       
  File "/usr/lib/python3.8/site-packages/beets/plugins.py", line 498, in send                                                                                                                                                           
    result = handler(**arguments)                                                                                                                                                                                                       
  File "/usr/lib/python3.8/site-packages/beets/plugins.py", line 153, in wrapper                                                                                                                                                        
    return func(*args, **kwargs)                                                                                                                                                                                                        
  File "/usr/lib/python3.8/site-packages/beetsplug/chroma.py", line 182, in fingerprint_task                                                                                                                                            
    return fingerprint_task(self._log, task, session)                                                                                                                                                                                   
  File "/usr/lib/python3.8/site-packages/beetsplug/chroma.py", line 251, in fingerprint_task                                                                                                                                            
    acoustid_match(log, item.path)                                                                                                                                                                                                      
  File "/usr/lib/python3.8/site-packages/beetsplug/chroma.py", line 91, in acoustid_match                                                                                                                                               
    duration, fp = acoustid.fingerprint_file(util.syspath(path))                                                                                                                                                                        
  File "/usr/lib/python3.8/site-packages/acoustid.py", line 340, in fingerprint_file                                                                                                                                                    
    return _fingerprint_file_audioread(path, maxlength)                                                                                                                                                                                 
  File "/usr/lib/python3.8/site-packages/acoustid.py", line 280, in _fingerprint_file_audioread                                                                                                                                         
    with audioread.audio_open(path) as f:                                                                                                                                                                                               
  File "/usr/lib/python3.8/site-packages/audioread/__init__.py", line 111, in audio_open                                                                                                                                                
    return BackendClass(path)                                                                                                                                                                                                           
  File "/usr/lib/python3.8/site-packages/audioread/rawread.py", line 62, in __init__                                                                                                                                                    
    self._fh = open(filename, 'rb')                                                                                                                                                                                                     
FileNotFoundError: [Errno 2] No such file or directory: b'/music/Grateful Dead/Spring 1990 (The Other One)/18-04 Candyman.flac'                                                                                                         
root@linuxserver-beets1:/# ^C                                                                                                                                                                                                           
r

When I locate the file, it is named ‘18-04 Candyman.1.flac’. If I manually change the filename to ‘18-04 Candyman.flac’, it shows ‘No such file or directory: b’/music/Grateful Dead/Spring 1990 (The Other One)/18-04 Candyman.1.flac’

These are part of my existing /music library that I’m trying to import. These files are a mess anyway so not really sure how to proceed. I’m also experiencing long wait times while importing so I’m going to install a beets on a RaspberryPi and see if I have better luck. If so I’m going to abandon the Synology install.

I really appreciate the help.

From your import command and config, it looks like you are trying to import your library again.

Try running a

beet update -p 

This will tell you what is different in the music folder compared to the beets database. The -p is pretend to update you database

OR

mv /music-import
mv /config/musiclibrary.blb /config/musiclibrary.blb.old
beet imp /music-import

This will start from scratch and might fix some of the errors that occurred on previous network mounted file systems