Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing: problems outputting raster layers from a model as a "final result" #26106

Closed
qgib opened this issue Feb 25, 2018 · 4 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented Feb 25, 2018

Author Name: Alister Hood (@AlisterH)
Original Redmine Issue: 18215
Affected QGIS version: 3.1(master)
Redmine category:processing/modeller
Assignee: Victor Olaya


I'm not sure if this is an issue with Processing itself, or with the QGIS raster algorithms, so please reassign as appropriate.

I tried to use the raster calculator in a processing model. First, in the model I gave the output a name (i.e. for a "final result") that had a space in it - "Corrected DEM". When running the model I didn't specify a name for the final result, and I got this error:

Processing algorithm…
AlgorithmDialog
Input parameters:
{ 'lidardem' : 'S:/Jobs/2011 - Hughes Developments Tuakau/calculations/Stormwater/HEC RAS/Terrain/Terrain.existing.tif', 'lidardemcorrection' : 0, 'qgis:rastercalculator_1:CORRECTED DEM' : 'C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/90e7047849344ff2988aa6bc5b21d789/qgis:rastercalculator_1:CORRECTED DEM.tif' }

Prepare algorithm: qgis:rastercalculator_1
Running Raster calculator [1/1]
Input Parameters:
{ CELLSIZE: 0, CRS: 'S:/Jobs/2011 - Hughes Developments Tuakau/calculations/Stormwater/HEC RAS/Terrain/Terrain.existing.tif', EXPRESSION: '"<qgis._core.QgsProcessingModelChildParameterSource object at 0x000001AE84BB8318>@1"+0.23', EXTENT: '', LAYERS: ['S:/Jobs/2011 - Hughes Developments Tuakau/calculations/Stormwater/HEC RAS/Terrain/Terrain.existing.tif'], OUTPUT: 'C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/90e7047849344ff2988aa6bc5b21d789/qgis:rastercalculator_1:CORRECTED DEM.tif' }
OK. Execution took 0.003 s (1 outputs).
Model processed OK. Executed 1 algorithms total in 0.032 s.
Execution completed in 0.06 seconds
Results:
{'qgis:rastercalculator_1:CORRECTED DEM': 'C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/90e7047849344ff2988aa6bc5b21d789/qgis:rastercalculator_1:CORRECTED ' 'DEM.tif'}

Loading resulting layers
The following layers were not correctly generated.
C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/90e7047849344ff2988aa6bc5b21d789/qgis:rastercalculator_1:CORRECTED DEM.tif
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

I tested and got the same result with the QGIS hillshade algorithm, so clearly processing models (either in general, or these particular ones) don't support "final output" names containing spaces.

I then replaced the space in the first model with an underscore, and when I tried running it I got this error:

Processing algorithm…
AlgorithmDialog
Input parameters:
{ 'lidardem' : 'S:/Jobs/2011 - Hughes Developments Tuakau/calculations/Stormwater/HEC RAS/Terrain/Terrain.existing.tif', 'lidardemcorrection' : 0, 'qgis:rastercalculator_1:CORRECTED_DEM' : 'C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/11ccb7a031b847cca745b3c16b1d2f16/qgis:rastercalculator_1:CORRECTED_DEM.tif' }

Prepare algorithm: qgis:rastercalculator_1
Running Raster calculator [1/1]
Input Parameters:
{ CELLSIZE: 0, CRS: 'S:/Jobs/2011 - Hughes Developments Tuakau/calculations/Stormwater/HEC RAS/Terrain/Terrain.existing.tif', EXPRESSION: '"<qgis._core.QgsProcessingModelChildParameterSource object at 0x000001AE84BB8318>@1"+0.23', EXTENT: '', LAYERS: ['S:/Jobs/2011 - Hughes Developments Tuakau/calculations/Stormwater/HEC RAS/Terrain/Terrain.existing.tif'], OUTPUT: 'C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/11ccb7a031b847cca745b3c16b1d2f16/qgis:rastercalculator_1:CORRECTED_DEM.tif' }
OK. Execution took 0.003 s (1 outputs).
Model processed OK. Executed 1 algorithms total in 0.028 s.
Execution completed in 0.05 seconds
Results:
{'qgis:rastercalculator_1:CORRECTED_DEM': 'C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/11ccb7a031b847cca745b3c16b1d2f16/qgis:rastercalculator_1:CORRECTED_DEM.tif'}

Loading resulting layers
The following layers were not correctly generated.
C:/Users/alistair/AppData/Local/Temp/processing_405afe20db5845519fdf6c9e5cabeae3/11ccb7a031b847cca745b3c16b1d2f16/qgis:rastercalculator_1:CORRECTED_DEM.tif
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

It seems to have correctly generated the output, but can't load it for some reason (there is nothing relevant in the log messages panel). Again, I get the same result using the QGIS hillshade algorithm. I also get the same result if I remove the underscore, just in case.


@qgib
Copy link
Contributor Author

qgib commented Feb 26, 2018

Author Name: Nyall Dawson (@nyalldawson)


Can you share your model?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 26, 2018

Author Name: Alister Hood (@AlisterH)


I just realised that I am testing on the nightly rather than the 3.0 release.
Examples attached - testing on Ubuntu (a slightly old nightly - before 3.0 release) suggests they are Windows only problems.


  • version was changed from 3.0.0 to 3.1(master)
  • operating_system was changed from to Windows
  • 12259 was configured as TEST2.model3
  • 12258 was configured as TEST1.model3

@qgib
Copy link
Contributor Author

qgib commented Mar 6, 2018

Author Name: Victor Olaya (@volaya)


Colons are not allowed in Windows filenames. Looks like that's the issue, since your output filenames have colons.

I mean, the temporary names that the modeler is assigning to the non-final outputs have colons, so they are not correctly saved, and the next algorithm in the workflow cannot use those intermediate files

@qgib
Copy link
Contributor Author

qgib commented Jun 1, 2018

Author Name: Nyall Dawson (@nyalldawson)


Fixed in 3.0/3.2


  • status_id was changed from Feedback to Closed
  • resolution was changed from to fixed/implemented

@qgib qgib closed this as completed Jun 1, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant