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: grass7 algorithms broken, (falsely) claims grass7 not installed #23636

Closed
qgib opened this issue Oct 17, 2016 · 3 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented Oct 17, 2016

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)
Original Redmine Issue: 15713
Affected QGIS version: master
Redmine category:processing/core
Assignee: Victor Olaya


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:

runalg(
                'grass7:v.voronoi',
                points(),
                False,
                False,
                '270778.60198,270855.745301,4458921.97814,4458983.8488',
                -1,
                0.0001,
                0,
                None,
            )

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_SNAP_TOLERANCE_PARAMETER <ParameterNumber>
	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 ;)

@qgib
Copy link
Contributor Author

qgib commented Oct 17, 2016

Author Name: Victor Olaya (@volaya)


25d0351 should fix it

Please confirm and close the ticket

Thanks for the report!

@qgib
Copy link
Contributor Author

qgib commented Oct 20, 2016

Author Name: Alexander Bruy (@alexbruy)


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 20, 2016

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


All good now. Thanks again Victor.


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

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib closed this as completed 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! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant