From a98fa054fe97c204461b370de6ee90d03e6f4ac4 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Mon, 1 Sep 2025 00:32:27 +0200 Subject: [PATCH] lastgenre: Fix failing CI tests by using syspath when loading c14n file. --- beetsplug/lastgenre/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index be329e8b5..f9a37d874 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -32,7 +32,7 @@ import yaml from beets import config, library, plugins, ui from beets.library import Album, Item -from beets.util import normpath, plurality, unique_list +from beets.util import normpath, plurality, syspath, unique_list LASTFM = pylast.LastFMNetwork(api_key=plugins.LASTFM_KEY) @@ -142,7 +142,7 @@ class LastGenrePlugin(plugins.BeetsPlugin): if c14n_filename: self._log.debug("Loading canonicalization tree {0}", c14n_filename) with codecs.open( - str(normpath(c14n_filename)), "r", encoding="utf-8" + syspath(normpath(c14n_filename)), "r", encoding="utf-8" ) as f: genres_tree = yaml.safe_load(f) flatten_tree(genres_tree, [], c14n_branches)