Bug report #18263

Interpolation algorithms not running in Graphical Modeler in QGIS 3.0

Added by Nimrod Gavish over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Processing/Modeller
Affected QGIS version:3.0.0 Regression?:Yes
Operating System:Windows 10 Pro Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26154

Description

I am not able to use several interpolation algorithms within the QGIS 3.0 graphical modeler, namely the 'Heatmap (Kernel Density)' and 'IDW interpolation'. The algorithms work fine via the GUI (selecting the tool in the Processing Toolbox and running in interface), but via the modeler this error is received for the IDW:

Processing algorithm…
AlgorithmDialog
Input parameters: { 'input' : 'Point?crs=EPSG:3857&field=id:long(10)&field=RoofType:string(80)&field=RoofMaterl:string(80)&field=HousingTyp:string(80)&field=HousingSta:string(80)&field=VillageNam:string(80)&field=Date:date(10)&field=value_conn:long(10,2)&uid={3ce7936f-348e-4887-be97-949f527b617b}', 'qgis:idwinterpolation_1:IDW' : 'C:/Users/ngavish/AppData/Local/Temp/processing_5239e21723384888b94e31a6882df374/ab5c6cfa43e9401dadb7baf38f220b0c/qgis:idwinterpolation_1:IDW.tif' }

Prepare algorithm: qgis:idwinterpolation_1
Running IDW interpolation [1/1]
Input Parameters: { COLUMNS: 300, DISTANCE_COEFFICIENT: 2, EXTENT: 'Point?crs=EPSG:3857&field=id:long(10)&field=RoofType:string(80)&field=RoofMaterl:string(80)&field=HousingTyp:string(80)&field=HousingSta:string(80)&field=VillageNam:string(80)&field=Date:date(10)&field=value_conn:long(10,2)&uid={3ce7936f-348e-4887-be97-949f527b617b}', INTERPOLATION_DATA: 'Point?crs=EPSG:3857&field=id:long(10)&field=RoofType:string(80)&field=RoofMaterl:string(80)&field=HousingTyp:string(80)&field=HousingSta:string(80)&field=VillageNam:string(80)&field=Date:date(10)&field=value_conn:long(10,2)&uid={5b349815-c131-40b8-a51d-b5e6de23a62e},0,7,0', OUTPUT: 'C:/Users/ngavish/AppData/Local/Temp/processing_5239e21723384888b94e31a6882df374/ab5c6cfa43e9401dadb7baf38f220b0c/qgis:idwinterpolation_1:IDW.tif', ROWS: 300 }
Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\qgis\IdwInterpolation.py", line 155, in processAlgorithm data.valueSource = int(v1) ValueError: invalid literal for int() with base 10: '2)&uid={5b349815-c131-40b8-a51d-b5e6de23a62e}'

Error encountered while running IDW interpolation

Error encountered while running IDW interpolation

Execution failed after 0.15 seconds

Loading resulting layers
The following layers were not correctly generated.
C:/Users/ngavish/AppData/Local/Temp/processing_5239e21723384888b94e31a6882df374/ab5c6cfa43e9401dadb7baf38f220b0c/qgis:idwinterpolation_1:IDW.tif
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

And for the heatmap:
Running Heatmap (Kernel Density Estimation) [1/1]
Input Parameters: { DECAY: 0, INPUT: 'Point?crs=EPSG:3857&field=id:long(10)&field=RoofType:string(80)&field=RoofMaterl:string(80)&field=HousingTyp:string(80)&field=HousingSta:string(80)&field=VillageNam:string(80)&field=Date:date(10)&field=value_conn:long(10,2)&uid={3ce7936f-348e-4887-be97-949f527b617b}', KERNEL: 0, OUTPUT: 'C:/Users/ngavish/AppData/Local/Temp/processing_5239e21723384888b94e31a6882df374/fe9c6dae3080487388d86bf5cbd13f96/qgis:heatmapkerneldensityestimation_1:Output.tif', OUTPUT_VALUE: 0, PIXEL_SIZE: 0.1, RADIUS: 30, RADIUS_FIELD: '', WEIGHT_FIELD: '' }
Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\qgis\Heatmap.py", line 213, in processAlgorithm self.tr('Could not create destination layer')) _core.QgsProcessingException: Could not create destination layer

Error encountered while running Heatmap (Kernel Density Estimation)

Error encountered while running Heatmap (Kernel Density Estimation)

Execution failed after 0.13 seconds

Loading resulting layers
The following layers were not correctly generated.
C:/Users/ngavish/AppData/Local/Temp/processing_5239e21723384888b94e31a6882df374/fe9c6dae3080487388d86bf5cbd13f96/qgis:heatmapkerneldensityestimation_1:Output.tif
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

And here is the error log:

2018-02-28T10:30:41 CRITICAL Error encountered while running Heatmap (Kernel Density Estimation)
2018-02-28T10:31:43 CRITICAL Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\qgis\Heatmap.py", line 213, in processAlgorithm
self.tr('Could not create destination layer'))
_core.QgsProcessingException: Could not create destination layer

2018-02-28T10:34:54 CRITICAL Error encountered while running IDW interpolation
2018-02-28T10:41:24 CRITICAL Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\qgis\Heatmap.py", line 213, in processAlgorithm
self.tr('Could not create destination layer'))
_core.QgsProcessingException: Could not create destination layer

Associated revisions

Revision 84cdd609
Added by Nyall Dawson over 2 years ago

[processing] Fix invalid filenames are used for temporary files
during models

Fixes #18263

Revision fe6e9673
Added by Nyall Dawson over 2 years ago

[processing] Fix invalid filenames are used for temporary files
during models

Fixes #18263

(cherry-picked from 84cdd6)

History

#1 Updated by Giovanni Manghi over 2 years ago

  • Regression? changed from No to Yes
  • Priority changed from Normal to High

#2 Updated by Nyall Dawson over 2 years ago

  • Assignee changed from Victor Olaya to Nyall Dawson
  • Status changed from Open to In Progress

#3 Updated by Nyall Dawson over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

#4 Updated by Giovanni Manghi over 2 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF