From a4bb1ce1d950651cc248935104d8dc777e38c2ff Mon Sep 17 00:00:00 2001 From: steveoh Date: Tue, 31 Jan 2023 17:50:33 -0700 Subject: [PATCH] fix: guard against no circles found --- row.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/row.py b/row.py index d062a81..dfcad92 100644 --- a/row.py +++ b/row.py @@ -338,6 +338,11 @@ def export_circles_from_image(circles, out_dir, file_name, cv2_image, height, wi Returns: list: a list of cv2 images """ + if circles is None: + logging.warning("No circles detected for %s", file_name) + + return [] + #: round the values to the nearest integer circles = np.uint16(np.around(circles))