From c21bca700281ebc2ec46d4b582050218799d2056 Mon Sep 17 00:00:00 2001 From: Stefano Cottafavi Date: Fri, 1 Mar 2024 15:59:06 +0100 Subject: [PATCH] fix libary path problem --- kimotor_action.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kimotor_action.py b/kimotor_action.py index 6ccb54f..6d21321 100644 --- a/kimotor_action.py +++ b/kimotor_action.py @@ -229,6 +229,9 @@ def init_path(self): if self.fp_path is None: self.fp_path = os.getenv("KICAD"+str(self.KICAD_VERSION)+"_FOOTPRINT_DIR", default=None) + # ensure only one separator + self.fp_path = os.path.normpath(self.fp_path) + os.sep + # no library found if self.fp_path is None: wx.LogError("Footprint library not found - Make sure the KiCad paths are properly configured.") @@ -853,7 +856,7 @@ def do_mounting_holes(self, r_mh_out=0, n_mh_out=0, r_mh_in=0, n_mh_in=0, n_edge # see https://forum.kicad.info/t/place-update-footprint-with-python/23103 if hs != "None": - fp_lib = self.fp_path + '/MountingHole.pretty' + fp_lib = self.fp_path + 'MountingHole.pretty' fp = self.mhole_db.get(hs) else: return