Crashing on resuming import - help please


#1

I’m running through my library to ensure it is nice and tidy by using the command ‘beet import’ on my linuxserver docker. Everything was working fine, until I got to J and I started getting the error below when I got to ‘James Brown’ and now when I resume my import I get the following error on the first entry that needs user import:

Traceback (most recent call last):
  File "/usr/bin/beet", line 11, in <module>
    load_entry_point('beets==1.4.6', 'console_scripts', 'beet')()
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1256, in main
    _raw_main(args)
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1243, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 937, in import_func
    import_files(lib, paths, query)
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 914, in import_files
    session.run()
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 327, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/lib/python2.7/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/python2.7/site-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
  File "/usr/lib/python2.7/site-packages/beets/util/pipeline.py", line 194, in coro
    func(*(args + (task,)))
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 1506, in plugin_stage
    func(session, task)
  File "/usr/lib/python2.7/site-packages/beets/plugins.py", line 124, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 805, in imported
    False, self.config['force'])
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 818, in fetch_item_lyrics
    lyrics = [self.get_lyrics(artist, title) for title in titles]
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 851, in get_lyrics
    lyrics = backend.fetch(artist, title)
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 388, in fetch
    return self.lyrics_from_song_api_path(song_api_path)
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 363, in lyrics_from_song_api_path
    html = BeautifulSoup(page.text, "html.parser")
NameError: global name 'BeautifulSoup' is not defined

My config is below - I had a look at beet.log, but there weren’t any clues in there. Help please

directory: /music_library/adults
library: /config/musiclibrary.blb
art_filename: albumart
threaded: yes
original_date: no
per_disc_numbering: no

import:
    write: yes
    move: yes
    copy: no
    resume: ask
    incremental: yes
    quiet_fallback: skip
    autotag: yes
    timid: no
    log: /config/beet.log

musicbrainz:
    host: 172.35.12.88:5000
    ratelimit: 100

########### DOCKER DEFUALTS #################

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

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

########### My additions #####################

# import folders are deleted if only files matching these patterns are left in folders 
clutter: ["Thumbs.DB", ".DS_Store", "*.m3u", ".pls", "*.jpg"]

########### PLUGINS #####################
# chroma and web installed with docker #

plugins: fetchart lyrics lastgenre embedart ftintitle convert scrub replaygain missing chroma web duplicates missing fromfilename

fetchart:
    auto: yes
    maxwidth: 300
    cautious: true
    sources: amazon filesystem coverart albumart google  wikipedia
    fanarttv_key: a013aa2ee126dfbe268c1a51fff7b2a7

lyrics:
    fallback: ''
    force: yes

lastgenre:
    auto: yes
    source: album
    canonical: yes
    canoncical: /config/genres-tree.yaml
    fallback: unknown
    whitelist: /config/genres.txt

embedart:
    auto: yes
    maxwidth: 300

ftintitle:
    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: yes
    overwrite: yes

#duplicates:
#    move: /duplicates

missing:
    format: $albumartist - $album - $track - $title
    count: no
    total: yes

#2

Hello! Sorry; it looks like we’re missing something from our documentation in the most recent release. Specifically, you can install BeautifulSoup like this:

pip install beautifulsoup4

The problem is this reintroduced Genius backend for the lyrics plugin:

It appears to have introduced a dependency we didn’t document. We should probably disable this backend by default also.


#3

Thanks - I think I’ll ask the linuxserver guys if they can add this to the docker, as beautifulsoup4 isn’t available on unRAID I think


#4

Hi, I’m from linuxserver and I’ve put this PR in for our docker image


#5

Hi

I’m still getting errors - not immediately though:

Traceback (most recent call last):
  File "/usr/bin/beet", line 11, in <module>
    load_entry_point('beets==1.4.6', 'console_scripts', 'beet')()
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1256, in main
    _raw_main(args)
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1243, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 937, in import_func
    import_files(lib, paths, query)
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 914, in import_files
    session.run()
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 327, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/lib/python2.7/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/python2.7/site-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
  File "/usr/lib/python2.7/site-packages/beets/util/pipeline.py", line 194, in coro
    func(*(args + (task,)))
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 1506, in plugin_stage
    func(session, task)
  File "/usr/lib/python2.7/site-packages/beets/plugins.py", line 124, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 805, in imported
    False, self.config['force'])
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 818, in fetch_item_lyrics
    lyrics = [self.get_lyrics(artist, title) for title in titles]
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 851, in get_lyrics
    lyrics = backend.fetch(artist, title)
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 388, in fetch
    return self.lyrics_from_song_api_path(song_api_path)
  File "/usr/lib/python2.7/site-packages/beetsplug/lyrics.py", line 356, in lyrics_from_song_api_path
    response = requests.get(song_url, headers=self.headers)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))

#6

Hmm. This looks again like it’s coming from the lyrics plugin. If there’s a way to reproduce this, could you please file a bug on GitHub?


#7

NP - will file a bug on github. But, the error above was only the 2nd time it’s happened since @sparklyballs updated the docker and I’ve been tagging today, so I can’t produce it on demand