Open ghtmtt opened 4 years ago
I too face the same bug. Same error message on the simplest of models. Thought i was something wrong with my local installation but the same for other fresh QGIS installs.
I am having a similar issue of the native raster calculator not working while using input from the output from algorithm.
@ghtmtt did you check localization? e.g. run qgis in English
I did PR in https://github.com/qgis/QGIS/issues/32753 but was not accepted because it's necessary a deeper refactoring and this needs time. The closed PR was just a patch.
@ghtmtt did you check localization? e.g. run qgis in English
yep. I tried in different languages (actually my default locale is en)
Still valid on QGIS 3.22.3.
it also happens to me. If I use the native raster calc in the model builder with existing layers it works fine. But if the inputs are temporal layers from the model it just doesnt work.
Same here, when using inputs from temporal layers the raster calculator in the model builder will not work; likely the issue is related to language settings and characters in the parsed temporary output variable. E.g. my guess is that in the expression box the extra single quote in italian translation of "from", thus :
"'Output' from algorithm 'XXX'@1" becomes
"'Output' dall'algoritmo 'XXX'@1" and this extra single quote seems to be messing up the parsing of the expression. My two cents. Hope this gets fixed and I am willing to help where I can as raster calculator is a very common step in models.
PS the work-around is to use GDAL's raster calculator.
Hi Francisco, I could fix it by changing the language of QGIS to EN, the native language of programming, I guess. I also made sure that the names of the 'Outputs' were in english to. Take a look . Now it works fine, just lost my shortcuts ;) I work with QGIS 3.16.11 (LTR)
Thank you Adrian, yes I know, in english it works fine, but I teach several courses to italian students and switching languages adds complexity that I would like to avoid.
@ghtmtt @gioman I think changing in file https://raw.githubusercontent.com/qgis/QGIS/master/i18n/qgis_it.ts from tag
`
Have this issue occuring in 3.16.7 and 3.20 with language EN_au. Cannot use the raster calculator in model builder due to temporary output issue, something to do with the naming of the output?
I have found the fix here is to make sure that the "Reference Layer(s)" contains your algorithm output(s). Otherwise it doesn't work. In the meantime i would suggest using the GDAL Raster Calc tool if your still having issues
I was having the same problem. The solution is to select all the inputs used in the calculation as reference layers. If one of them is missing, it will return an error.
Im having this issue on english qgis 3.32
I'm also still having this problem on English QGIS 3.32. A calculation will work when done as an individual operation, but try to employ the same calculation in the GM using output from a prior calc as an input and it breaks the model every time even when the reference layer is set correctly.
As noted by others, the GDAL raster calculator works fine (even though I don't like using it as much).
Describe the bug Native Processing Raster Calculator is not working in Processing Modeler. I tried with both complicated and super simple models and simple formulas. With the exact same data and outside the Modeler, the Raster Calculator is working nice.
Here the model in attach test.model3.zip
How to Reproduce
In attach you can find a simple model that calculates the slope and the hillshade of a raster layer and these 2 outputs are then summed. I get the following error in the log
and the layer is still created but with values from
1.79769e+308
to-1.79769e+308
(actually empty).If you try to create both slope and hillshade in the toolbox and then use the raster calculator outside the modeler than it works just perfectly.
QGIS and OS versions
QGIS 3.15 in Linux
I had a look and there are similar issues #32753, #33338