Bug report #12229

python/plugins/processing/algs/qgis/ConcaveHull.py - throws error in python console

Added by Madlene Nussbaum over 4 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assignee:Alexander Bruy
Category:Processing/QGIS
Affected QGIS version:2.4.0 Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:20417

Description

Dear maintainer

Plugin: QGis geoalgorithms - Vector geometry tools - ConcaveHull
Issue: GUI works completly fine, using the python console to achieve the same end throws an error.

Input code and error message see below.

Thank you a lot,
Madlene

  1. ----
    1. Input into QGIS python console
      from qgis.core import *
      import qgis.utils
      import processing
      layer = QgsVectorLayer("/path/to/pointshape.shp", "pointshape", "ogr")
      layer.isValid()
      processing.runalg("qgis:concavehull","/path/to/pointshape.shp",0.1,False,False,"/path/to/resultConcave.shp")
  2. -> this syntax corresponds to the log (History and Log/Algorithm) executed if I use the GUI
  1. Output on console {u'/tmp/processing/acd8509206cc4028b505fc3f27fa9fc9/OUTPUT.shp': <qgis._core.QgsVectorLayer object at 0x7f3cf3f39df8>, u'/path/to/pointshape.shp': <qgis._core.QgsVectorLayer object at 0x7f3cf3f39c30>} {u'/tmp/processing/acd8509206cc4028b505fc3f27fa9fc9/OUTPUT.shp': <qgis._core.QgsVectorLayer object at 0x7f3cf3f39df8>, u'/path/to/pointshape.shp': <qgis._core.QgsVectorLayer object at 0x7f3cf3f39c30>} {u'/tmp/processing/acd8509206cc4028b505fc3f27fa9fc9/OUTPUT.shp': <qgis._core.QgsVectorLayer object at 0x7f3cf3f39df8>, u'/path/to/pointshape.shp': <qgis._core.QgsVectorLayer object at 0x7f3cf3f39c30>} {'OUTPUT': '/path/to/resultConcave.shp'}
  1. -> no result shapefile produced under the given path
  1. QGIS Error log
    Uncaught error while executing algorithm
    Traceback (most recent call last):
    Traceback (most recent call last):
    File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 217, in execute
    self.processAlgorithm(progress)
    File "/usr/share/qgis/python/plugins/processing/algs/qgis/ConcaveHull.py", line 81, in processAlgorithm
    progress.setPercentage(feat.id()*counter)
    File "/usr/share/qgis/python/plugins/processing/gui/MessageBarProgress.py", line 56, in setPercentage
    self.progress.setValue(i)
    RuntimeError: wrapped C/C++ object of type QProgressBar has been deleted

Associated revisions

Revision 14c858a0
Added by Alexander Bruy over 3 years ago

[processing] fix crash in ConcaveHull alg when using it from console (fix #12229)

History

#1 Updated by Alexander Bruy over 3 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixed in 14c858a0b1

Also available in: Atom PDF