Open leolami opened 5 years ago
Can you please share a test project plus data?
In the zip we can find datas, project and model created using italian language interface Thank you
I'm sorry: I missed the notification of the attachment, I'll check it out ASAP.
@leolami @mudomau may you try apply this commit: https://github.com/luipir/QGIS/commit/a78dbb7d2cfe01914491ba786e9f8ddef19e7584 (you can just cut&paste in the python code) and check if it fix in your locale conditions? i checked and it works, but I'm not completely sure when alg variable are translated or not... in some of my tests I had variable translations, and in some others no :/... so please check!
Nope.
Cut&Pasted, saved.
Opened QGIS, changed the Language to Spanish, closed the program.
Opened it again, tried to run the model and got the same error as before - "pointer cannot be cast to float".
Then I changed the language to English, closed and re-opened the program, ran the same model and no error (well - a different error did happen, but the Raster Calculator worked).
@mudomau checking
@mudomau can you share model and data set? I successfylly executed @leolami model and yours in https://github.com/qgis/QGIS/issues/33338#issuecomment-564910701
@mudomau @leolami ???
@luipir Sorry for the delay in the reply, been rather busy these past few days. Model and data set I'm using is the same one provided in #33338 .
I just ran the model on a different DEM (You can find the model and DEM here - https://viridire-my.sharepoint.com/:f:/g/personal/m_dikdan_ralos-newenergy_de/Ephw9BnW72xGrXJu45kw8ekBsrl5xIxjQF60_ykRaEMGWw?e=LyCNYc) with the program in English. It worked as expected.
I then changed the interface language to "español de España" and the Regional configuration to "Spanish Spain (es_ES)", and restarted the program.
Ran the model again on the linked DEM, and it failed. Specifically, from the model register I'm seeing:
"Step 3 (QGIS raster calculator) completed with no errors" -> This should generate a temporary .tif that becomes the input for Step 4.
"Step 4: Could not load layer for INPUT_A: temp file not found."
When I look at the program message log however, the error seems to come from Step 3 (as the formula that is labled as "CRITICAL - pointer cannot be cast to type 'float'" is part of this step)
I just double-checked that the changes from https://github.com/luipir/QGIS/commit/a78dbb7d2cfe01914491ba786e9f8ddef19e7584 were saved in the RasterCalculator.py, and they were.
I added the message logs to the linked folder, in case they might be of help.
@luipir I think the right solution here is to NOT translate the strings that create the temporary raster name (such as "'Aspect' from algorithm 'Aspect'")
See: https://github.com/qgis/QGIS/issues/33317#issuecomment-564113171
@mudomau strange! I used your model (but different dem) and the same steps and I wasn't able to reproduce the error with my fix... I'll check on Win environment (but I can't today sorry)
Hi everyone, I modified RasterCalculator.py as in the commit luipir@a78dbb7 and I can confirm that now the model works also with the italian language interface
done PR... strictly to fix this issue that seems solved. Tnx @leolami and @mudomau to test them, and sorry to be late.
Tnx to you
Probably related to #32310.
Echoing @ghtmtt 's concerns, It seems to be a similar case with me.
This should have been closed by https://github.com/qgis/QGIS/pull/33601
It seems to me this issue was never fixed (#33601 was never merged) and it occurs with current QGIS versions.
Hi all,
context: Raster Calculator added in a Processing model + 1 rasters as input Using the Raster Calculator module inside a Model I have an output always as float raster with [-1.7: 1.7]
This only happens if the interface is in Italian or Spanish. Everything works correctly with the interface in English. I have not verified with other languages
Maybe there's a related issue at https://github.com/qgis/QGIS/issues/27130
Thanks