Beets: Badfiles Plugin Throws Error When Run on OS X

Created on 4 Feb 2017  路  3Comments  路  Source: beetbox/beets

Problem

I am receiving an error when I attempt to run the beet badfiles plugin.

Running this command in verbose (-vv) mode:

$ beet -vv bad Worst

Led to this problem:

$ beet -vv bad Worst
user configuration: /Users/aaron/.config/beets/config.yaml
data directory: /Users/aaron/.config/beets
plugin paths: 
Sending event: pluginload
library database: /Volumes/Drobo Vol 1/Music/beets/musiclibrary.db
library directory: /Volumes/Drobo Vol 1/Music/beets/music
Sending event: library_opened
badfiles: checking path: /Volumes/Drobo Vol 1/Music/beets/music/88 Fingers Louie/Back on the Streets/10 Worst Man Won.mp3
badfiles: running command: mp3val "/Volumes/Drobo Vol 1/Music/beets/music/88 Fingers Louie/Back on the Streets/10 Worst Man Won.mp3"
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 9, in <module>
    load_entry_point('beets==1.4.4', 'console_scripts', 'beet')()
  File "/Library/Python/2.7/site-packages/beets-1.4.4-py2.7.egg/beets/ui/__init__.py", line 1209, in main
    _raw_main(args)
  File "/Library/Python/2.7/site-packages/beets-1.4.4-py2.7.egg/beets/ui/__init__.py", line 1196, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/Library/Python/2.7/site-packages/beets-1.4.4-py2.7.egg/beetsplug/badfiles.py", line 103, in check_bad
    status, errors, output = checker(path)
  File "/Library/Python/2.7/site-packages/beets-1.4.4-py2.7.egg/beetsplug/badfiles.py", line 55, in check_mp3val
    status, errors, output = self.run_command(["mp3val", path])
  File "/Library/Python/2.7/site-packages/beets-1.4.4-py2.7.egg/beetsplug/badfiles.py", line 38, in run_command
    output = check_output(cmd, stderr=STDOUT)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 20] Not a directory

Setup

  • OS: OS X 10.11.6 (15G1108)
  • Python version: 2.7.10
  • beets version: 1.4.4 running from SHA of ae6a32405c67ad8d54e0723687c92160635efa70
  • Turning off plugins made problem go away (yes/no): Not possible because this is an issue with a plugin.

My configuration (output of beet config) is:

fetchart:
    auto: yes
    sources: coverart itunes amazon albumart wikipedia google
    google_key: REDACTED
    minwidth: 0
    google_engine: 001442825323518660753:hrh5ch1gjzm
    enforce_ratio: no
    cautious: no
    maxwidth: 0
    store_source: no
    fanarttv_key: REDACTED
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
chroma:
    auto: yes
embedart:
    auto: yes
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    maxwidth: 0
mbsubmit:
    format: $track. $albumartist - $artist - $album - $title ($length)
    threshold: medium

plugins: mbsubmit embedart fetchart chroma fromfilename badfiles web
directory: /Volumes/Drobo Vol 1/Music/beets/music

import:
    move: yes
    log: /Volumes/Drobo Vol 1/Music/beets/beets-import.log
library: /Volumes/Drobo Vol 1/Music/beets/musiclibrary.db
web:
    host: 127.0.0.1
    include_paths: no
    port: 8337
    cors: ''
needinfo

Most helpful comment

Glad it's working! I also pushed a fix that will avoid the ugly traceback when this kind of error happens. (I also ran across a Python 3 bug in the process, and that's now fixed too.)

All 3 comments

Hmm, I can't seem to reproduce this on my Mac. I even tried making a folder, changing into it, deleting the folder I'm in and then running the command but I can't get any errors from it.

Could you provide the output from these commands?

ls -lah "/Volumes/Drobo Vol 1/Music/beets/music/88 Fingers Louie/Back on the Streets/"
mp3val "/Volumes/Drobo Vol 1/Music/beets/music/88 Fingers Louie/Back on the Streets/10 Worst Man Won.mp3"

Thanks for the response. While running the commands you specified, I realized it was due to a problem with placing mp3val on my system's PATH. Thanks again!

Glad it's working! I also pushed a fix that will avoid the ugly traceback when this kind of error happens. (I also ran across a Python 3 bug in the process, and that's now fixed too.)

Was this page helpful?
0 / 5 - 0 ratings