Bug report #15985

Concave hull not working in Processing (QGIS3)

Added by matteo ghetta almost 3 years ago. Updated over 2 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Processing/QGIS
Affected QGIS version:master Regression?:Yes
Operating System:Linux mint Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23901

Description

Concave hull algorithm always throws an error. In QGIS 2.18 it works fine (tested with point data within the processing test framework)

2016-12-15T10:47:55 2 Uncaught error while executing algorithm
Traceback (most recent call last):
File "/home/matteo/lavori/QGIS/build-qgis3/output/python/plugins/processing/core/GeoAlgorithm.py", line 213, in execute
self.processAlgorithm(progress)
File "/home/matteo/lavori/QGIS/build-qgis3/output/python/plugins/processing/algs/qgis/ConcaveHull.py", line 76, in processAlgorithm
features = delaunay_layer.getFeatures()
AttributeError: 'NoneType' object has no attribute 'getFeatures'

Associated revisions

Revision e232a080
Added by Arnaud Morvan over 2 years ago

[processing] Handle context in processing.run

Fix #15985 (Concave hull)

History

#1 Updated by Giovanni Manghi almost 3 years ago

  • Priority changed from Normal to Severe/Regression

#2 Updated by Alexander Bruy almost 3 years ago

This happens because now temporary layers are memory layers and Processing fails to locate algorithm result

#3 Updated by matteo ghetta over 2 years ago

Ok, any chance or way to fix this? Can I help making other tests?

Thanks again!

#4 Updated by Arnaud Morvan over 2 years ago

For now, with Nyall work on porting processing to c++.
The processing.run method create a QgsProcessingContext (in Processing.runAlgorithm) and the ouput, some memory layer is placed in context.temporaryStore.
But it is not possible to pass the parent (caller) algorithm context to processing.run so it is not possible to get back the layer object.

I see the possibility to add a context parameter to processing.run, like is done with feedback.

#5 Updated by Arnaud Morvan over 2 years ago

Here is a pull request that highlight the situation : https://github.com/qgis/QGIS/pull/4439
It fix the error, but Nyall may have other plans.

#6 Updated by Arnaud Morvan over 2 years ago

  • Assignee changed from Victor Olaya to Nyall Dawson

#7 Updated by Giovanni Manghi over 2 years ago

  • Regression? set to Yes

#8 Updated by Giovanni Manghi over 2 years ago

  • Priority changed from Severe/Regression to High

#9 Updated by Giovanni Manghi over 2 years ago

  • Easy fix? set to No

#10 Updated by Arnaud Morvan over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF