Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thumbnails plugin fails #1686

Closed
simonbcn opened this issue Nov 2, 2015 · 3 comments
Closed

thumbnails plugin fails #1686

simonbcn opened this issue Nov 2, 2015 · 3 comments

Comments

@simonbcn
Copy link

simonbcn commented Nov 2, 2015

Ubuntu 14.04 64 bits
beets git version 1.3.16

Config file:

directory: "/home/simon/M\xFAsica/"
library: /home/simon/.beets/musiclibrary.blb
threaded: no

plugins: convert fetchart info duplicates badfiles zero replaygain embedart lastgenre scrub chroma discogs
# thumbnails

fetchart:
  auto: yes
  maxwidth: 300

embedart:
  auto: yes
  maxwidth: 300
  remove_art_file: yes

match:
  strong_rec_thresh: 0.30
  max_rec:
    missing_tracks: strong

import:
  art: yes
  languages: es en

paths:
  default: $albumartist/$album/$track - $title
  singleton: $artist - $title
  comp: Varios/$album/$track - $title

replaygain:
  backend: bs1770gain
  overwrite: yes

lastgenre:
  canonical: yes

convert:
  auto: yes
  tmpdir: /tmp
  command: ffmpeg -i $source -y -codec:a libmp3lame -vn -qscale:a 1 $dest
  extension: mp3
  #embed: yes
  quiet: yes
  never_convert_lossy_files: yes

duplicates:
  path: yes
#   checksum: yes

thumbnails:
  force: yes

scrub: 
  auto: yes  

zero:
  fields: comments
  update_database: true

It still fails, now with another error (complete output):

$ beet -vv import /dunehd/Musica\ pendiente/Eros\ Ramazzotti\ -\ Eros\ 30\ \(2014\)\ FLAC/
....
thumbnails: generating thumbnail for Eros Ramazzotti - Eros 30
artresizer: ImageMagick resizing /home/simon/Música/Eros Ramazzotti/Eros 30/cover.1.jpg to /home/simon/.cache/thumbnails/large/0828df789bd167971fa265da40f18e06.png
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 9, in <module>
    load_entry_point('beets==1.3.16', 'console_scripts', 'beet')()
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/ui/__init__.py", line 1163, in main
    _raw_main(args)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/ui/__init__.py", line 1153, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/ui/commands.py", line 860, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/ui/commands.py", line 837, in import_files
    session.run()
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/importer.py", line 320, in run
    pl.run_sequential()
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/util/pipeline.py", line 378, in run_sequential
    list(self.pull())
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/util/pipeline.py", line 455, in pull
    out = coro.send(msg)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/util/pipeline.py", line 160, in coro
    task = func(*(args + (task,)))
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/importer.py", line 1380, in manipulate_files
    session=session,
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/importer.py", line 679, in manipulate_files
    plugins.send('import_task_files', session=session, task=self)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/plugins.py", line 458, in send
    result = handler(**arguments)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/plugins.py", line 123, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beetsplug/fetchart.py", line 457, in assign_art
    album.set_art(path, not src_removed)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/library.py", line 1068, in set_art
    plugins.send('art_set', album=self)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/plugins.py", line 458, in send
    result = handler(**arguments)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/plugins.py", line 123, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beetsplug/thumbnails.py", line 131, in process_album
    wrote &= self.make_cover_thumbnail(album, 256, LARGE_DIR)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beetsplug/thumbnails.py", line 155, in make_cover_thumbnail
    util.syspath(target))
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/util/artresizer.py", line 176, in resize
    return func(maxwidth, path_in, path_out)
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/util/artresizer.py", line 95, in im_resize
    b'-resize', b'{0}x^>'.format(maxwidth), path_out
  File "/usr/local/lib/python2.7/dist-packages/beets-1.3.16-py2.7.egg/beets/util/__init__.py", line 703, in command_output
    cmd=b' '.join(cmd),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)
@sampsyo
Copy link
Member

sampsyo commented Nov 2, 2015

Thanks for the report. I just pushed something that I believe should fix the crash—can you please verify that it does?

@simonbcn
Copy link
Author

simonbcn commented Nov 3, 2015

Now It doesn't fail but neither I see the thumbnail in GNOME nautilus 3.10.1.
I have tested the plugin directly:

$ beet -vv thumbnails 'lana del rey'
user configuration: /home/simon/.config/beets/config.yaml
data directory: /home/simon/.config/beets
plugin paths: 
Sending event: pluginload
artresizer: method is (2, (6, 7, 7))
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
library database: /home/simon/.beets/musiclibrary.blb
library directory: /home/simon/Música
Sending event: library_opened
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
thumbnails: generating thumbnail for Lana Del Rey - Honeymoon
thumbnails: album Lana Del Rey - Honeymoon has no art
Sending event: cli_exit

But there is a .jpg file in folder named cover.jpg:

01 - Honeymoon.mp3
02 - Music to Watch Boys To.mp3
03 - Terrence Loves You.mp3
04 - God Knows I Tried.mp3
05 - High by the Beach.mp3
06 - Freak.mp3
07 - Art Deco.mp3
08 - Burnt Norton (interlude).mp3
09 - Religion.mp3
10 - Salvatore.mp3
11 - The Blackest Day.mp3
12 - 24.mp3
13 - Swan Song.mp3
14 - Don’t Let Me Be Misunderstood.mp3
cover.jpg

@sampsyo
Copy link
Member

sampsyo commented Nov 3, 2015

If you can do more investigation to figure out exactly what's going wrong, @simonbcn, please open a new bug. For example, a useful bug report might look like:

I use the file manager X, which wants thumbnails to be generated in format Y (see this link to the documentation). The thumbnails plugin seems to do Z instead. If I manually make some change, then I can make X recognize the thumbnail. So I think the plugin needs to do that in order to work for my setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants