From bafa89ab3a00fee2c287f25ea991327b3890e258 Mon Sep 17 00:00:00 2001 From: Tim Lister Date: Tue, 10 Dec 2024 09:02:26 -0800 Subject: [PATCH] Swap to using open_text from importlib_resources --- src/etc/etc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/etc.py b/src/etc/etc.py index 69ef3ef..c15283e 100644 --- a/src/etc/etc.py +++ b/src/etc/etc.py @@ -34,7 +34,7 @@ class ETC(object): _V_band = SpectralElement.from_filter("johnson_v") def __init__(self, config_file=None, components=None): - PRESET_MODELS = toml.loads(pkg_resources.read_text(data, "FTN_FLOYDS.toml")) + PRESET_MODELS = toml.load(pkg_resources.open_text(data, "FTN_FLOYDS.toml")) self.components = components if components is not None else [] if config_file is None and len(self.components) == 0: component_config = PRESET_MODELS