diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index c84226b4c..9ab4fc1e4 100755 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -40,6 +40,11 @@ def call(args): raise ReplayGainError( "{0} exited with status {1}".format(args[0], e.returncode) ) + except UnicodeEncodeError: + # Due to a bug in Python 2's subprocess on Windows, Unicode + # filenames can fail to encode on that platform. See: + # http://code.google.com/p/beets/issues/detail?id=499 + raise ReplayGainError("argument encoding failed") def parse_tool_output(text): """Given the tab-delimited output from an invocation of mp3gain diff --git a/docs/changelog.rst b/docs/changelog.rst index c08c28316..b2747cf0a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,8 @@ Changelog * :doc:`/plugins/scrub`: Fix an incompatibility with Python 2.6. * :doc:`/plugins/lyrics`: Fix an issue that failed to find lyrics when metadata contained "real" apostrophes. +* :doc:`/plugins/replaygain`: On Windows, emit a warning instead of + crashing when analyzing non-ASCII filenames. 1.0rc2 (December 31, 2012) --------------------------