Skip to content

Commit 60a87e9

Browse files
committed
[processing] Fix error when creating tests and raster output
no longer exists Fixes #16123
1 parent 4289bcb commit 60a87e9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/plugins/processing/gui/TestTools.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@ def createTest(text):
263263
return
264264

265265
dataset = gdal.Open(token, GA_ReadOnly)
266+
if dataset is None:
267+
QMessageBox.warning(None,
268+
tr('Error'),
269+
tr('Seems some outputs are temporary '
270+
'files. To create test you need to '
271+
'redirect all algorithm outputs to '
272+
'files'))
273+
return
274+
266275
dataArray = nan_to_num(dataset.ReadAsArray(0))
267276
strhash = hashlib.sha224(dataArray.data).hexdigest()
268277

0 commit comments

Comments
 (0)