From 215967fe784bccb1cf0f0ec03e49c1b5304e3673 Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Fri, 19 Feb 2021 21:16:26 -0600 Subject: [PATCH] Path: Catch error if `ofstShape` has no `Area` attribute --- src/Mod/Path/PathScripts/PathProfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index faac61a9f7..da702108c9 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -933,7 +933,11 @@ class ObjectProfile(PathAreaOp.ObjectOp): # CHECK for ZERO area of offset shape try: - osArea = ofstShp.Area + if hasattr(ofstShp, "Area"): + osArea = ofstShp.Area + else: + PathLog.error('No area to offset shape returned.\n') + return list() except Exception as ee: PathLog.error('No area to offset shape returned.\n{}'.format(ee)) return list()