diff --git a/beetsplug/echonest.py b/beetsplug/echonest.py index f04cbf9bb..2c8a35c69 100644 --- a/beetsplug/echonest.py +++ b/beetsplug/echonest.py @@ -289,7 +289,7 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin): pending. This is stolen from Jakob Schnitzers convert plugin. """ - fd, dest = tempfile.mkstemp(u'.ogg') + fd, dest = tempfile.mkstemp(b'.ogg') os.close(fd) self._log.info(u'encoding {0} to {1}', diff --git a/test/test_echonest.py b/test/test_echonest.py index 6a1929b6f..1289decd2 100644 --- a/test/test_echonest.py +++ b/test/test_echonest.py @@ -109,6 +109,12 @@ class EchonestCliTest(unittest.TestCase, TestHelper): self.assertNotEqual(item.path, echonest_track.call_args[1]['filename']) + @patch('pyechonest.song.search') + @patch('beetsplug.echonest.CONVERT_COMMAND', 'cp $source $dest') + def test_analyze_convert2(self, echonest_search): + self.add_item(format='FLAC', path=b'm\xc3\xacn.flac') + self.run_command('echonest') + @patch('pyechonest.song.profile') @patch('pyechonest.song.search') @patch('pyechonest.track.track_from_filename')