From 010ee0bf2a3e967a4dea94e6142eab12ceac0ee1 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 26 Nov 2024 15:43:03 +0100 Subject: [PATCH] Fix amici.petab.import_helpers._can_import_model --- python/sdist/amici/petab/import_helpers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/sdist/amici/petab/import_helpers.py b/python/sdist/amici/petab/import_helpers.py index 70af87c3b3..19afe5b237 100644 --- a/python/sdist/amici/petab/import_helpers.py +++ b/python/sdist/amici/petab/import_helpers.py @@ -3,7 +3,6 @@ Functions for PEtab import that are independent of the model format. """ -import importlib import logging import os import re @@ -138,8 +137,7 @@ def _can_import_model(model_name: str, model_output_dir: str | Path) -> bool: """ # try to import (in particular checks version) try: - with amici.add_path(model_output_dir): - model_module = importlib.import_module(model_name) + model_module = amici.import_model_module(model_name, model_output_dir) except ModuleNotFoundError: return False