Skip to content
Browse files
[processing] show error message instead of Python error if output ras…
…ter is temp output and test can not be created
  • Loading branch information
alexbruy committed Oct 6, 2016
1 parent 17010ac commit 45a84419ffea466fbc432f2016090d869c36a453
Showing with 10 additions and 1 deletion.
  1. +10 −1 python/plugins/processing/gui/
@@ -37,7 +37,7 @@
from numpy import nan_to_num

from qgis.PyQt.QtCore import QCoreApplication, QMetaObject
from qgis.PyQt.QtWidgets import QDialog, QVBoxLayout, QTextEdit
from qgis.PyQt.QtWidgets import QDialog, QVBoxLayout, QTextEdit, QMessageBox

from processing.core.Processing import Processing
from processing.core.outputs import (
@@ -232,6 +232,15 @@ def createTest(text):
if isinstance(out, (OutputNumber, OutputString)):
results[] = str(out)
elif isinstance(out, OutputRaster):
if token is None:
tr('Seems some outputs are temporary '
'files. To create test you need to '
'redirect all algorithm outputs to '

dataset = gdal.Open(token, GA_ReadOnly)
dataArray = nan_to_num(dataset.ReadAsArray(0))
strhash = hashlib.sha224(

0 comments on commit 45a8441

Please sign in to comment.