From 69439634c5fd94091eeaa8911b3437d711ecef89 Mon Sep 17 00:00:00 2001 From: Frozen <15183460+Frzoen@users.noreply.github.com> Date: Wed, 3 May 2023 15:08:33 +0200 Subject: [PATCH] Ensure that string is passed to the re.match r"^(.+?):(.+?)$ is failing to match ID which is just numbers --- src/kiutils/footprint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kiutils/footprint.py b/src/kiutils/footprint.py index 08b55df..312a543 100644 --- a/src/kiutils/footprint.py +++ b/src/kiutils/footprint.py @@ -670,7 +670,7 @@ def libId(self, symbol_id: str): - symbol_id (str): The symbol id in the following format: ``:`` or only ```` """ - parse_symbol_id = re.match(r"^(.+?):(.+?)$", symbol_id) + parse_symbol_id = re.match(r"^(.+?):(.+?)$", str(symbol_id)) if parse_symbol_id: self.libraryNickname = parse_symbol_id.group(1) self.entryName = parse_symbol_id.group(2)