修复Step7采样点布设路径读取问题:GDAL环境变量保护+路径归一化+FileNotFoundError检查+水域掩膜备选路径扫描
This commit is contained in:
@ -229,6 +229,11 @@ class WorkerThread(QThread):
|
||||
|
||||
def run(self):
|
||||
"""运行 pipeline:子线程内切换 Matplotlib 为 Agg,避免 Qt5Agg 在后台线程绘图导致界面卡死。"""
|
||||
import os
|
||||
# GDAL 环境变量保护(放在最前面,防止路径/编码问题)
|
||||
os.environ['GDAL_FILENAME_IS_UTF8'] = 'YES'
|
||||
os.environ['SHAPE_ENCODING'] = 'UTF-8'
|
||||
|
||||
mpl_prev = None
|
||||
try:
|
||||
import matplotlib
|
||||
|
||||
Reference in New Issue
Block a user