From 8fa71f78feb4e09c46079e881f2f2e2c8686ef3d Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Tue, 14 Jun 2016 00:44:43 -0400 Subject: [PATCH] decode bytes from .encode() in lyrics plugin --- beetsplug/lyrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index aa526c870..1bce066c9 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -503,7 +503,7 @@ class Google(Backend): try: text = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore') - text = unicode(re.sub('[-\s]+', ' ', text)) + text = unicode(re.sub('[-\s]+', ' ', text.decode('utf-8'))) except UnicodeDecodeError: self._log.exception(u"Failing to normalize '{0}'", text) return text