diff --git a/beetsplug/keyfinder.py b/beetsplug/keyfinder.py index fa86b1c69..e3e9a86ba 100644 --- a/beetsplug/keyfinder.py +++ b/beetsplug/keyfinder.py @@ -61,9 +61,16 @@ class KeyFinderPlugin(BeetsPlugin): continue try: - output = util.command_output([bin, '-f', item.path]) + output = util.command_output([bin, b'-f', + util.syspath(item.path)]) except (subprocess.CalledProcessError, OSError) as exc: - self._log.error(u'execution failed: {0}', exc) + self._log.error('execution failed: {0}', exc) + continue + except UnicodeEncodeError: + # Workaround for Python 2 Windows bug. + # http://bugs.python.org/issue1759845 + self._log.error('execution failed for Unicode path: {0!r}', + item.path) continue key_raw = output.rsplit(None, 1)[-1] diff --git a/docs/changelog.rst b/docs/changelog.rst index ed567dc8a..e23217196 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -59,6 +59,7 @@ Fixes: * Fix a bug, where the autotagger still considers matches that are specifically listed under the config's ignored section. :bug:`1487` * Fix a bug with unicode strings when generating thumbnails. :bug:`1485` +* :doc:`/plugins/keyfinder`: Fix handling of Unicode paths. :bug:`1502` 1.3.13 (April 24, 2015)