From d655aa1e1f0a9d4c655698f6db852e3f6947f5d2 Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Mon, 15 May 2023 19:19:44 +0200 Subject: troubleshoot: read numbers with exponent --- lib/elements/fill_stitch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/elements/fill_stitch.py') diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 912f3ba6..62bd1aca 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -607,13 +607,13 @@ class FillStitch(EmbroideryElement): def validation_errors(self): if not self.shape_is_valid(self.shape): why = explain_validity(self.shape) - message, x, y = re.findall(r".+?(?=\[)|-?\d+(?:\.\d+)?", why) + message, x, y = re.match(r"(?P.+)\[(?P.+)\s(?P.+)\]", why).groups() yield InvalidShapeError((x, y)) def validation_warnings(self): # noqa: C901 if not self.shape_is_valid(self.original_shape): why = explain_validity(self.original_shape) - message, x, y = re.findall(r".+?(?=\[)|-?\d+(?:\.\d+)?", why) + message, x, y = re.match(r"(?P.+)\[(?P.+)\s(?P.+)\]", why).groups() if "Hole lies outside shell" in message: yield UnconnectedWarning((x, y)) else: -- cgit v1.2.3