Bug report #15713

processing: grass7 algorithms broken, (falsely) claims grass7 not installed

Added by Mathieu Pellerin - nIRV almost 5 years ago. Updated almost 5 years ago.

Assignee:Victor Olaya
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:23636


For ~1 week now, I can't execute any grass7 algorithm within processing. When I try to do so, I can an error message telling me Grass7 is not installed, which is incorrect,

Looking into the code a bit, I realized the "grass7 not installed" message is triggered whenever a test runalg() fails (in Grass7Utils.py). The test is as follow:


Running this test manually, the failure here is not due to missing Grass7, but to the number of arguments provided != (alg.getVisibleParametersCount() + alg.getVisibleOutputsCount())

This is what I get if I the runalg() test in python console:

Error: Wrong number of parameters
ALGORITHM: v.voronoi - Creates a Voronoi diagram from an input vector layer containing points.
    input <ParameterVector>
    -l <ParameterBoolean>
    -t <ParameterBoolean>
    GRASS_REGION_PARAMETER <ParameterExtent>
    GRASS_MIN_AREA_PARAMETER <ParameterNumber>

Looking into value for variables at play here, I get:
- len(args) = 8
- alg.getVisibleParametersCount() = 6
- alg.getVisibleOutputsCount() = 0

So indeed, 8 != 6, which throws an error that ends up being (mis-)interpreted as me not having Grass7 installed.

Victor, hopefully this time it's not a bigger-than-processing issue ;)


#1 Updated by Victor Olaya almost 5 years ago

25d0351 should fix it

Please confirm and close the ticket

Thanks for the report!

#2 Updated by Alexander Bruy almost 5 years ago

  • Status changed from Open to Feedback

#3 Updated by Mathieu Pellerin - nIRV almost 5 years ago

  • Resolution set to fixed/implemented
  • % Done changed from 0 to 100
  • Status changed from Feedback to Closed

All good now. Thanks again Victor.

Also available in: Atom PDF