# Buggy code
def art_for_album(album, paths, maxwidth=None, local_only=False):
    """Given an Album object, returns a path to downloaded art for the
    album (or None if no art is found). If `maxwidth`, then images are
    resized to this maximum pixel size. If `local_only`, then only local
    image files from the filesystem are returned; no network requests
    are made.
    """
    out = None

    # Local art.
    cover_names = config["fetchart"]["cover_names"].as_str_seq()
    cautious = config["fetchart"]["cautious"].get(bool)
    if paths:
        for path in paths:
            out = art_in_path(path, cover_names, cautious)
            if out:
                break

    # Web art sources.
    remote_priority = config["fetchart"]["remote_priority"].get(bool)
    if not local_only and (remote_priority or not out):
        for url in _source_urls(album):
            if maxwidth:
                url = ArtResizer.shared.proxy_url(maxwidth, url)
            candidate = _fetch_image(url)
            if candidate:
                out = candidate
                break

    if maxwidth and out:
        out = ArtResizer.shared.resize(maxwidth, out)
    return out


# Traceback (UnicodeDecodeError)
sombra/somasis:~/MusicIncoming/ λ beet -v imp Blank\ Banshee\ -\ Blank\ Banshee\ *
user configuration: /home/somasis/.config/beets/config.yaml
Sending event: pluginload
Sending event: library_opened
data directory: /home/somasis/.config/beets
library database: /home/somasis/Music/library.blb
library directory: /home/somasis/Music
error reading Blank Banshee - Blank Banshee 0 - QR-SCAN-Print.jpg: error reading /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - QR-SCAN-Print.jpg: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - QR-SCAN-Print.jpg
Sending event: import_task_start
error reading Blank Banshee - Blank Banshee 1 - FREE WALLPAPER√√√.jpg: error reading /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - FREE WALLPAPER√√√.jpg: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - FREE WALLPAPER√√√.jpg
error reading Blank Banshee - Blank Banshee 1 - �.jpg: error reading /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - �.jpg: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - �.jpg
error reading cover.jpg: error reading /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/cover.jpg: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/cover.jpg
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 01 B- Start Up.flac'
chroma: matched recordings [u'0d6b4c02-4252-40b8-a96b-ee92a7541782']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 02 Wavestep.flac'
chroma: matched recordings [u'e78f39e0-ec1e-4095-be6e-3c8ccf175d61']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 03 Bathsalts.flac'
chroma: matched recordings [u'1cd0bb95-49e3-4cea-960e-b821ba124fbe']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 04 Ammonia Clouds.flac'
chroma: matched recordings [u'32b1f0d0-ac89-45b9-af8b-2444558a4a05']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 05 Venus Death Trap.flac'
chroma: matched recordings [u'b9ae6039-6824-4fa9-82d2-22e391b0cb77']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 06 HYP\xe2\x98\xb0R OBJ\xe2\x98\xb0CT.flac'
chroma: matched recordings [u'cc9c4295-22d2-4f0f-a322-fd1225bf4c0e']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 07 Photosynthesis.flac'
chroma: matched recordings [u'6f95814c-9325-4637-a183-2ce16278c62e']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 08 D \xe2\x98\xb0 \xe2\x98\xb0 P $ P \xce\x9b C \xe2\x98\xb0.flac'
chroma: matched recordings [u'8f019dc2-1bfd-424d-aa25-975efc2d00f4']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 09 Dreamcast.flac'
chroma: matched recordings [u'aedd2a55-75cd-4bb2-acaf-968faae74e4e']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 10 Cyber Zodiac.flac'
chroma: matched recordings [u'814922c4-1706-45b9-99ab-33af5bca27eb']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 11 Teen Pregnancy.flac'
chroma: matched recordings [u'53bd825f-bce0-4bc2-b139-c32b791f61b2']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 12 Purity Boys.flac'
chroma: matched recordings [u'01553d3f-4acb-4d38-bd64-4bd20ea56380']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 13 Visualization.flac'
chroma: matched recordings [u'f54e6b16-f91c-4a53-bf67-28a7e3bca871']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 14 World Vision.flac'
chroma: matched recordings [u'512ec8a6-b9da-4e16-a8de-2077eb5194dd']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0/Blank Banshee - Blank Banshee 0 - 15 B- Shut down-Depression.flac'
chroma: matched recordings [u'a1085c33-6b6b-463e-ae6a-c3203969f0d3']
Looking up: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0
Tagging Blank Banshee - Blank Banshee 0
No album IDs found.
Search terms: Blank Banshee - Blank Banshee 0
Album might be VA: False
acoustid album candidates: 1
Discogs API Error: 503 Service Unavailable (query: Blank Banshee Blank Banshee 0
Evaluating 6 candidates.
Candidate: Blank Banshee - Blank Banshee 0
Success. Distance: 0.000000
Candidate: Blank Banshee - Blank Banshee 1
Success. Distance: 0.714291
Candidate: Blank Banshee - Blank Banshee 1
Success. Distance: 0.648056
Candidate: Screaming Banshee Aircrew - When All Is Said and Done
Success. Distance: 0.818253
Candidate: Gerda Blank - gerda:BLANK
Success. Distance: 0.872529
Candidate: Blank Banshee - Blank Banshee 0
Duplicate.
Sending event: import_task_start

/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 0 (15 items)
Tagging:
Blank Banshee - Blank Banshee 0
URL:
http://musicbrainz.org/release/9509a46c-b2d9-4ac5-b4a9-f219a18be3b4
(Similarity: 100.0%) (Digital Media, 2012, CA)
* D ☰ ☰ P  $ P Λ C ☰ -> D ☰ ☰ P $ P Λ C ☰
Sending event: import_task_choice
This album is already in the library!
[S]kip new, Keep both, Remove old? chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 01 B- Infinite Login.flac'
chroma: matched recordings [u'7afcf15d-9b85-48d2-ad44-4d60307d91ea']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 02 Eco Zones.flac'
chroma: matched recordings [u'b2332635-4963-471e-bb33-40d3be821d0e', u'd4f6d63b-8ef0-4db3-a904-ec0a561f35c0']
rchroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 03 METAMATERIAL.flac'
chroma: matched recordings [u'b2abaf84-f060-4fae-94ab-1230a25987f8', u'c3374faa-89fc-4a18-a8f9-3c242e78fb2a']

Sending event: import_task_apply
15 of 15 items replaced
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
lyrics not found: Blank Banshee - Teen Pregnancy
lyrics not found: Blank Banshee - D ☰ ☰ P $ P Λ C ☰
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 04 Anxiety Online !.flac'
chroma: matched recordings [u'23fcbedc-c9ea-4465-9221-7018ee039241']
lyrics not found: Blank Banshee - Photosynthesis
lyrics not found: Blank Banshee - Purity Boys
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 05 Java Clouds-\xd9\x85\xd8\xac\xd8\xb3\xd9\x85\xd9\x87 \xd8\xb3\xd8\xa7\xd8\xb2\xdb\x8c \xd9\x85\xd9\x87\xd8\xaa\xd8\xa7\xd8\xa8.flac'
chroma: matched recordings [u'0ee06ce3-3fea-4c94-bae4-81acbbb5abf2', u'b683574d-2abe-4473-a624-a7d9ec8c867c']
lyrics not found: Blank Banshee - Dreamcast
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 06 LSD Polyphony.flac'
chroma: matched recordings [u'40277e03-7e07-4b30-970b-0979a45c7314', u'4d80187c-6660-4330-a179-a61f1cafad13']
lyrics not found: Blank Banshee - Visualization
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 07 Conflict Minerals.flac'
chroma: matched recordings [u'5dca7ab9-8374-4542-b080-563e9a84a71b', u'acd0e9ef-0a65-4de9-be50-4210e3b12aa0']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 08 Metal Rain.flac'
chroma: matched recordings [u'da81c6b9-73b3-4428-86ce-e0c958fd8388', u'e6553f3a-dd38-407a-8350-72f75bcc3239']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 09 Big Gulp.flac'
chroma: matched recordings [u'48bb5157-f145-4a26-91f2-1bbfe3843ad4', u'5bad5e8b-a738-45c0-9702-fa580716d85b']
lyrics not found: Blank Banshee - B:/ Start Up
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 10 Doldrum Corp..flac'
chroma: matched recordings [u'40783287-5e49-4986-8c2e-98fc76bc4575', u'd48b5188-8830-4f34-ab96-99bec735d592']
lyrics not found: Blank Banshee - Bathsalts
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 11 Cyber Slums.flac'
chroma: matched recordings [u'252b73ea-fa04-47d0-b030-ff074240db78', u'4fab878d-9656-4a3f-b8d1-195d374eabf2']
lyrics not found: Blank Banshee - Cyber Zodiac
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 12 Realization.flac'
chroma: matched recordings [u'79f44bff-d5be-46f0-89a5-e5c56efa3dda']
lyrics not found: Blank Banshee - Venus Death Trap
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 13 SOLAR PLEXUS.flac'
chroma: matched recordings [u'456e401f-e3cd-44c6-b7e8-fee3dce95785']
lyrics not found: Blank Banshee - World Vision
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 14 Paradise Disc -\xe8\x8a\xb8\xe8\x83\xbd\xe5\xb1\xb1\xe5\x9f\x8e\xe7\xb5\x84.flac'
chroma: matched recordings [u'45b77e22-08f8-4e21-bff7-60c32c445f66']
chroma: fingerprinted '/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 15 B- Hidden-Reality.flac'
chroma: matched recordings [u'0b2b6785-e9b9-494a-a3fd-7c7c332af4e1']
Looking up: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1
Tagging Blank Banshee - Blank Banshee 1
No album IDs found.
Search terms: Blank Banshee - Blank Banshee 1
Album might be VA: False
lyrics not found: Blank Banshee - Ammonia Clouds
lyrics not found: Blank Banshee - HYP☰R OBJ☰CT
acoustid album candidates: 1
lyrics not found: Blank Banshee - B:/ Shut down/Depression
lyrics not found: Blank Banshee - Wavestep
fetchart: using fallback art file Blank Banshee - Blank Banshee 0 - QR-SCAN-Print.jpg
Discogs API Error: 404 Not Found (query: Blank Banshee Blank Banshee 1
Evaluating 6 candidates.
Candidate: Blank Banshee - Blank Banshee 1
Success. Distance: 0.234335
Candidate: Blank Banshee - Blank Banshee 1
Success. Distance: 0.000000
Candidate: Blank Banshee - Blank Banshee 0
Success. Distance: 0.634043
Candidate: Screaming Banshee Aircrew - When All Is Said and Done
added last.fm album genre (artist): Electronic
Success. Distance: 0.822202
Sending event: database_change
Candidate: Gerda Blank - gerda:BLANK
Success. Distance: 0.882945
Candidate: Blank Banshee - Blank Banshee 1
Duplicate.

/home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1 (15 items)
Tagging:
Blank Banshee - Blank Banshee 1
URL:
http://musicbrainz.org/release/5e66f0d1-6925-44ab-b96c-da7c7bfd644c
(Similarity: 100.0%) (Digital Media, 2013)
Sending event: import_task_choice
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: import_task_apply
replacing item 8860: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 04 Anxiety Online !.flac
Sending event: database_change
Sending event: item_removed
replacing item 8864: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 12 Realization.flac
Sending event: database_change
Sending event: item_removed
replacing item 8862: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 08 Metal Rain.flac
Sending event: database_change
Sending event: item_removed
replacing item 8871: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 11 Cyber Slums.flac
Sending event: database_change
Sending event: item_removed
replacing item 8868: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 13 SOLAR PLEXUS.flac
Sending event: database_change
Sending event: item_removed
replacing item 8865: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 05 Java Clouds-مجسمه سازی مهتاب.flac
Sending event: database_change
Sending event: item_removed
replacing item 8867: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 09 Big Gulp.flac
Sending event: database_change
Sending event: item_removed
replacing item 8866: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 15 B- Hidden-Reality.flac
Sending event: database_change
Sending event: item_removed
replacing item 8874: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 02 Eco Zones.flac
Sending event: database_change
Sending event: item_removed
replacing item 8870: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 03 METAMATERIAL.flac
Sending event: database_change
Sending event: item_removed
replacing item 8863: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 10 Doldrum Corp..flac
Sending event: database_change
Sending event: item_removed
replacing item 8872: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 01 B- Infinite Login.flac
Sending event: database_change
Sending event: item_removed
replacing item 8873: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 07 Conflict Minerals.flac
Sending event: database_change
Sending event: item_removed
replacing item 8861: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 14 Paradise Disc -芸能山城組.flac
Sending event: database_change
Sending event: item_removed
replacing item 8869: /home/somasis/MusicIncoming/Blank Banshee - Blank Banshee 1/Blank Banshee - Blank Banshee 1 - 06 LSD Polyphony.flac
Sending event: database_change
Sending event: database_change
Sending event: item_removed
15 of 15 items replaced
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
added last.fm item genre (track): Electronic
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
lyrics not found: Blank Banshee - Anxiety Online !
added last.fm item genre (artist): Electronic
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
lyrics not found: Blank Banshee - Realization
added last.fm item genre (track): Techno
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
lyrics not found: Blank Banshee - Metal Rain
added last.fm item genre (track): Chillwave
Sending event: database_change
added last.fm item genre (track): Chillwave
Sending event: database_change
lyrics not found: Blank Banshee - Cyber Slums
added last.fm item genre (artist): Electronic
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
added last.fm item genre (track): Acid
lyrics not found: Blank Banshee - SOLAR PLEXUS
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
added last.fm item genre (artist): Electronic
Sending event: database_change
removing 15 old duplicated items
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/01 - Blank Banshee - B__ Start Up.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/02 - Blank Banshee - Wavestep.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/03 - Blank Banshee - Bathsalts.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/04 - Blank Banshee - Ammonia Clouds.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/05 - Blank Banshee - Venus Death Trap.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/06 - Blank Banshee - HYPR OBJCT.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/07 - Blank Banshee - Photosynthesis.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/08 - Blank Banshee - D   P $ P L C.flac
lyrics not found: Blank Banshee - Java Clouds/مجسمه سازی مهتاب
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/09 - Blank Banshee - Dreamcast.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/10 - Blank Banshee - Cyber Zodiac.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/11 - Blank Banshee - Teen Pregnancy.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/12 - Blank Banshee - Purity Boys.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/13 - Blank Banshee - Visualization.flac
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/14 - Blank Banshee - World Vision.flac
lyrics not found: Blank Banshee - Big Gulp
Sending event: database_change
Sending event: database_change
Sending event: item_removed
deleting duplicate /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/15 - Blank Banshee - B__ Shut down_Depression.flac
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/11 - Blank Banshee - Teen Pregnancy.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/08 - Blank Banshee - D   P $ P L C.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Techno -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/07 - Blank Banshee - Photosynthesis.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/12 - Blank Banshee - Purity Boys.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Chillwave -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/09 - Blank Banshee - Dreamcast.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Acid -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/13 - Blank Banshee - Visualization.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/01 - Blank Banshee - B__ Start Up.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/03 - Blank Banshee - Bathsalts.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Chillwave -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/10 - Blank Banshee - Cyber Zodiac.flac
Sending event: after_write
Sending event: item_copied
lyrics not found: Blank Banshee - B:/ Hidden/Reality
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/05 - Blank Banshee - Venus Death Trap.flac
Sending event: after_write
Sending event: item_copied
lyrics not found: Blank Banshee - Eco Zones
lyrics not found: Blank Banshee - METAMATERIAL
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/14 - Blank Banshee - World Vision.flac
Sending event: after_write
Sending event: item_copied
lyrics not found: Blank Banshee - Doldrum Corp.
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/04 - Blank Banshee - Ammonia Clouds.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/06 - Blank Banshee - HYPR OBJCT.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/15 - Blank Banshee - B__ Shut down_Depression.flac
Sending event: after_write
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
[zero] genre: Electronic -> None
[zero] day: 1 -> None
[zero] month: 9 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/02 - Blank Banshee - Wavestep.flac
Sending event: after_write
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: import_task_files
Sending event: database_change
Sending event: album_imported
Embedding album art into Blank Banshee - Blank Banshee 0.
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/01 - Blank Banshee - B__ Start Up.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/02 - Blank Banshee - Wavestep.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/03 - Blank Banshee - Bathsalts.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/04 - Blank Banshee - Ammonia Clouds.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/05 - Blank Banshee - Venus Death Trap.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/06 - Blank Banshee - HYPR OBJCT.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/07 - Blank Banshee - Photosynthesis.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/08 - Blank Banshee - D   P $ P L C.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/09 - Blank Banshee - Dreamcast.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/10 - Blank Banshee - Cyber Zodiac.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/11 - Blank Banshee - Teen Pregnancy.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/12 - Blank Banshee - Purity Boys.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/13 - Blank Banshee - Visualization.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/14 - Blank Banshee - World Vision.flac
Sending event: after_write
Sending event: write
[zero] genre:  -> None
[zero] day: 0 -> None
[zero] month: 0 -> None
auto-scrubbing /home/somasis/Music/Blank Banshee - Blank Banshee 0 (2012 - FLAC)/15 - Blank Banshee - B__ Shut down_Depression.flac
Sending event: after_write
lyrics not found: Blank Banshee - B:/ Infinite Login
lyrics not found: Blank Banshee - Conflict Minerals
lyrics not found: Blank Banshee - Paradise Disc /芸能山城組
lyrics not found: Blank Banshee - LSD Polyphony
Traceback (most recent call last):
File "/usr/bin/beet", line 9, in <module>
load_entry_point('beets==1.3.7', 'console_scripts', 'beet')()
File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 966, in main
_raw_main(args)
File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 957, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 841, in import_func
import_files(lib, paths, query)
File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 813, in import_files
session.run()
File "/usr/lib/python2.7/site-packages/beets/importer.py", line 290, in run
pl.run_parallel(QUEUE_SIZE)
File "/usr/lib/python2.7/site-packages/beets/util/pipeline.py", line 299, in run
out = self.coro.send(msg)
File "/usr/lib/python2.7/site-packages/beets/util/pipeline.py", line 181, in coro
func(*(args + (task,)))
File "/usr/lib/python2.7/site-packages/beets/importer.py", line 1077, in plugin_stage
func(session, task)
File "/usr/lib/python2.7/site-packages/beetsplug/fetchart.py", line 325, in fetch_art
path = art_for_album(task.album, task.paths, self.maxwidth, local)
File "/usr/lib/python2.7/site-packages/beetsplug/fetchart.py", line 240, in art_for_album
out = art_in_path(path, cover_names, cautious)
File "/usr/lib/python2.7/site-packages/beetsplug/fetchart.py", line 179, in art_in_path
images = sorted(images, key=lambda x: filename_priority(x, cover_names))
File "/usr/lib/python2.7/site-packages/beetsplug/fetchart.py", line 179, in <lambda>
images = sorted(images, key=lambda x: filename_priority(x, cover_names))
File "/usr/lib/python2.7/site-packages/beetsplug/fetchart.py", line 163, in filename_priority
return [idx for (idx, x) in enumerate(cover_names) if x in filename]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 48: ordinal not in range(128)

# Fixed code
def art_for_album(album, paths, maxwidth=None, local_only=False):
    """Given an Album object, returns a path to downloaded art for the
    album (or None if no art is found). If `maxwidth`, then images are
    resized to this maximum pixel size. If `local_only`, then only local
    image files from the filesystem are returned; no network requests
    are made.
    """
    out = None

    # Local art.
    cover_names = config["fetchart"]["cover_names"].as_str_seq()
    cover_names = map(util.bytestring_path, cover_names)
    cautious = config["fetchart"]["cautious"].get(bool)
    if paths:
        for path in paths:
            out = art_in_path(path, cover_names, cautious)
            if out:
                break

    # Web art sources.
    remote_priority = config["fetchart"]["remote_priority"].get(bool)
    if not local_only and (remote_priority or not out):
        for url in _source_urls(album):
            if maxwidth:
                url = ArtResizer.shared.proxy_url(maxwidth, url)
            candidate = _fetch_image(url)
            if candidate:
                out = candidate
                break

    if maxwidth and out:
        out = ArtResizer.shared.resize(maxwidth, out)
    return out