Beets: Missing modules and plugins with invalid syntax

Created on 11 Feb 2017  路  6Comments  路  Source: beetbox/beets

Problem

Fetchart plugin has some syntax errors reported, along with bandcamp plugin.

Both acoustid and echonest say I am missing their respective beetsplug.* modules.

Running this command in verbose (-vv) mode:

$ beet -vv (... paste here ...)

Led to this problem:

user configuration: /home/delueze/.config/beets/config.yaml
data directory: /home/delueze/.config/beets
plugin paths: /home/delueze/.config/beets/plugins
** error loading plugin acoustid:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 254, in load_plugins
    namespace = __import__(modname, None, None)
ModuleNotFoundError: No module named 'beetsplug.acoustid'

** error loading plugin bandcamp:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 254, in load_plugins
    namespace = __import__(modname, None, None)
  File "/home/delueze/.config/beets/plugins/bandcamp.py", line 25, in <module>
    from beetsplug import fetchart
  File "/usr/lib/python3.6/site-packages/beetsplug/fetchart.py", line 39, in <module>
    import itunes
  File "/usr/lib/python3.6/site-packages/itunes/__init__.py", line 94
    except urllib2.HTTPError, e:
                            ^
SyntaxError: invalid syntax

** error loading plugin echonest:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 254, in load_plugins
    namespace = __import__(modname, None, None)
ModuleNotFoundError: No module named 'beetsplug.echonest'

** error loading plugin fetchart:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 254, in load_plugins
    namespace = __import__(modname, None, None)
  File "/usr/lib/python3.6/site-packages/beetsplug/fetchart.py", line 39, in <module>
    import itunes
  File "/usr/lib/python3.6/site-packages/itunes/__init__.py", line 94
    except urllib2.HTTPError, e:
                            ^
SyntaxError: invalid syntax

Sending event: pluginload
artresizer: method is (2, (6, 9, 7))
library database: /home/delueze/.config/beets/library.blb
library directory: /home/delueze/Music
Sending event: library_opened
Usage: 
  beet COMMAND [ARGS...]
  beet help COMMAND

Options:
  --format-item=FORMAT_ITEM
                        print with custom format
  --format-album=FORMAT_ALBUM
                        print with custom format
  -l LIBRARY, --library=LIBRARY
                        library database file to use
  -d DIRECTORY, --directory=DIRECTORY
                        destination music directory
  -v, --verbose         log more details (use twice for even more)
  -c CONFIG, --config=CONFIG
                        path to configuration file
  -h, --help            show this help message and exit

Commands:
  acousticbrainz    fetch metadata from AcousticBrainz
  clearart          remove images from file metadata
  config            show or edit the user configuration
  duplicates (dup)  List duplicate tracks or albums.
  edit              interactively edit metadata
  embedart          embed image files into file metadata
  extractart        extract an image from file metadata
  fields            show fields available for queries and format strings
  fingerprint       generate fingerprints for items without them
  ftintitle         move featured artists to the title field
  help (?)          give detailed help on a specific sub-command
  import (imp, im)  import new music
  list (ls)         query the library
  lyrics            fetch song lyrics
  mbsync            update metadata from musicbrainz
  missing (miss)    List missing tracks.
  modify (mod)      change metadata fields
  move (mv)         move or copy items
  remove (rm)       remove matching items from the library
  replaygain        analyze for ReplayGain
  rymgenre          fetch genres from rateyourmusic.com
  scrub             clean audio tags
  setlister         create playlist from an artists' latest setlist
  stats             show statistics about the library or a query
  submit            submit Acoustid fingerprints
  update (upd, up)  update the library
  version           output version information
  write             write tag information to files
Sending event: cli_exit

Setup

  • OS: Manjaro Linux
  • Python version: Python 2.7, Python 3.5, and Python 3.6 it looks like beets is using 3.6.0
  • beets version: 1.4.4
  • Turning off plugins made problem go away (yes/no): yes

My configuration (output of beet config) is:

############################################################################
## Beets Configuration file.
## ~./config/beets/config.yaml
#############################################################################

### Global Options
library: ~/.config/beets/library.blb
directory: ~/Music/
pluginpath: ~/.config/beets/plugins
ignore: .AppleDouble ._* *~ .DS_Store
per_disc_numbering: true
threaded: yes

# Plugins
plugins: [
  chroma,
  acoustid,
  acousticbrainz,
  bandcamp,
  duplicates,
  echonest,
  edit,
  embedart,
  fetchart,
  ftintitle,
  lyrics,
  mbsync,
  missing,
  replaygain,
  rymgenre,
  setlister,
  scrub
]

# Import Options
import:
  move: true
  write: true
  delete: false
  resume: ask
  incremental: false
  quiet_fallback: skip
  timid: true
  group_albums: yes
  languages: en
  log: ~/beets-import.log

# Autotagger options
match:
  preferred:
    contries: ['US','GB|UK','JP']
    media: ['CD','Digital Media|File']
    original_year: yes

# Path options
paths:
  default: asciify{$albumartist/$album%aunique{}/$track $title}
  singleton: asciify{$artist/$album%aunique{}/$track $title}
  comp: asciify{Various Artists/$album%aunique{}/$track $title}

### Plugin Options

# Embeded album art options
embedart:
   compare_threshold: 80
   maxwidth: 500

# FetchArt options
fetchart:
   minwidth: 500
   sources: coverart itunes albumart wikipedia

# Lyrics options
lyrics:
   force: yes
   google_API_key: SCRUBBED FOR PRIVACY

# rymgenre doesn't run on import, so I use it as a backup
# for when lastgenre is giving me garbage results.
rymgenre:
  classes: primary
  depth: node

# Fetch fresh album art for new imports
fetchart:
  sources: coverart itunes amazon albumart
  store_source: yes

# Normalizing audio decibels
# Gstreamer is a pain, but still the correct backend
replaygain:
  backend: gstreamer
  overwrite: yes

# Make playlists from setlists
setlister:
  playlist_dir:~/Music/setlists

# Scrub extra metadata
scrub:
  auto: no

acoustid:
  apikey: SCRUBBED FOR PRIVACY

echonest:
  apikey: <API_KEY>
  auto: yes
needinfo

All 6 comments

All the syntax errors seem to be coming from the itunes package. If my memory serves me well, it is lacking maintenance and not python3 ready. I would advise you to drop itunes as an albumart source and see what it does for you.

I don't have a real clue for the ModuleNotFound errors, but I'd like to see them without the errors coming from the itunes package.

also the echonest plugin is gone: https://github.com/beetbox/beets/issues/1920

About the iTunes backend for fetchart, it looks like #2371 also reported that the library isn't Py3-compatible.

Also, there is no plugin called acoustid; you're probably thinking of chroma.

Also, it looks like you're referring to a "bandcamp" plugin we don't ship. You might want to contact the author of that plugin instead of this issue tracker.

Resolved. Removed itunes as a source in the config and the lines referencing itunes within the fetchart plugin

The bandcamp plugin is also working now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

foways picture foways  路  5Comments

vredesbyyrd picture vredesbyyrd  路  4Comments

hashhar picture hashhar  路  3Comments

clounie picture clounie  路  3Comments

nopoz picture nopoz  路  4Comments