From 4dd7077d560eecc1f6a14d0e7a981d89583412a6 Mon Sep 17 00:00:00 2001 From: xhong Date: Fri, 23 Jan 2026 17:37:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(raw=5Fto=5Fcog.py):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=96=87=E4=BB=B6=E5=A4=87=E7=94=A8=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E7=9A=84=E4=BA=8C=E6=AC=A1=E6=A3=80=E6=9F=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/raw_to_cog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/raw_to_cog.py b/utils/raw_to_cog.py index d97a5e6..2179f56 100644 --- a/utils/raw_to_cog.py +++ b/utils/raw_to_cog.py @@ -58,6 +58,9 @@ def tif_to_cog( logging.info(f"输入文件: {input_path}") if not os.path.exists(str(input_path)): input_path = str(input_path).replace(".tif", "(2).tif") + if not os.path.exists(input_path): + logging.error(f"无法找到输入文件: {input_path}") + return ds = gdal.Open(input_path) if ds is None: logging.error(f"无法打开输入文件: {input_path}")