diff --git a/python/cucim/src/cucim/skimage/morphology/_skeletonize.py b/python/cucim/src/cucim/skimage/morphology/_skeletonize.py index 6193a17d..d0b8c6b4 100644 --- a/python/cucim/src/cucim/skimage/morphology/_skeletonize.py +++ b/python/cucim/src/cucim/skimage/morphology/_skeletonize.py @@ -253,12 +253,17 @@ def medial_axis(image, mask=None, return_distance=False, *, rng=None): """ try: from skimage.morphology._skeletonize_cy import _skeletonize_loop - except ImportError as e: - warnings.warn( - "Could not find required private skimage Cython function:\n" - "\tskimage.morphology._skeletonize_cy._skeletonize_loop\n" - ) - raise e + except ImportError: + try: + from skimage.morphology._skeletonize_various_cy import ( + _skeletonize_loop, + ) # noqa: E501 + except ImportError as e: + warnings.warn( + "Could not find required private skimage Cython function:\n" + "\tskimage.morphology._skeletonize_cy._skeletonize_loop\n" + ) + raise e if mask is None: # masked_image is modified in-place later so make a copy of the input