From f6f8e85e2531679a8e1b4bb54d5a4e00b417cddb Mon Sep 17 00:00:00 2001 From: Samweli Date: Fri, 1 Dec 2023 16:38:05 +0300 Subject: [PATCH] fix for the sip enumeration error --- src/cplus_plugin/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cplus_plugin/utils.py b/src/cplus_plugin/utils.py index 4b63fa4e3..c55798b55 100644 --- a/src/cplus_plugin/utils.py +++ b/src/cplus_plugin/utils.py @@ -278,9 +278,10 @@ def align_rasters( resample_method_value = QgsAlignRaster.ResampleAlg.RA_NearestNeighbour - for method in QgsAlignRaster.ResampleAlg: - if method.value == int(resample_method): - resample_method_value = method + try: + resample_method_value = QgsAlignRaster.ResampleAlg(int(resample_method)) + except Exception as e: + log(f"Problem creating a resample value when snapping, {e}") if rescale_values: lst[0].rescaleValues = rescale_values