From b1f6b9dc7206e19cb25bc2bf065d8df26520bb3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20M=C3=BCller?= Date: Mon, 25 Mar 2024 20:14:12 +0100 Subject: [PATCH] fix: incorrect reversion of insertion in sys.path when registering a model --- CHANGELOG | 2 ++ src/nanite/model/logic.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 98772eb..1b24eb3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +4.1.1 + - fix: incorrect reversion of insertion in sys.path when registering a model 4.1.0 - ref: move to "src"-rooted source tree - ref: move iterative `sneddon_spher` model to separate package which diff --git a/src/nanite/model/logic.py b/src/nanite/model/logic.py index da145aa..d1494c9 100644 --- a/src/nanite/model/logic.py +++ b/src/nanite/model/logic.py @@ -42,7 +42,7 @@ def load_model_from_file(path, register=False): raise ModelImportError(f"Could not import '{path}'!") finally: # undo our path insertion - sys.path.pop(0) + sys.path.remove(str(path.parent)) sys.dont_write_bytecode = False mod = NaniteFitModel(module)