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

badfiles plugin crashes with unicode characters in filename #2299

Closed
mfiano opened this Issue Dec 2, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@mfiano

mfiano commented Dec 2, 2016

beets crashes with:

user configuration: /home/axion/.config/beets/config.yaml
data directory: /home/axion/.config/beets
plugin paths: 
Sending event: pluginload
inline: adding item field hifi
inline: adding item field disc_and_track
inline: adding item field release
library database: /home/axion/.config/beets/library.db
library directory: /mnt/extra1/music/sorted
Sending event: library_opened
badfiles: checking path: /mnt/extra1/music/sorted/artists/Air/(1998) Moon Safari [FLAC 16bit-44.1kHz]/01 La Femme d’argent.flac
badfiles: running command: flac -wst "/mnt/extra1/music/sorted/artists/Air/(1998) Moon Safari [FLAC 16bit-44.1kHz]/01 La Femme d’argent.flac"
x27[31;01m/mnt/extra1/music/sorted/artists/Air/(1998) Moon Safari [FLAC 16bit-44.1kHz]/01 La Femme d’argent.flacx27[39;49;00m: checker exited withs status 1
Traceback (most recent call last):
  File "/usr/sbin/beet", line 11, in <module>
    load_entry_point('beets==1.3.19', 'console_scripts', 'beet')()
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1266, in main
    _raw_main(args)
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1253, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/lib/python2.7/site-packages/beetsplug/badfiles.py", line 107, in check_bad
    ui.print_("  {}".format(displayable_path(line)))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 13: ordinal not in range(128)

Seems like it doesn't like the fancy quote character in this filename:

01 La Femme d’argent.flac

@sampsyo sampsyo closed this in 991c993 Dec 3, 2016

@sampsyo

This comment has been minimized.

Show comment
Hide comment
@sampsyo

sampsyo Dec 3, 2016

Member

Thanks! I've pushed a fix.

Member

sampsyo commented Dec 3, 2016

Thanks! I've pushed a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment