[QGIS-Developer] GRASS r.kappa not working in QGIS plugin

Sophie Crommelinck sophie.crommelinck at gmail.com
Sun Aug 5 23:10:49 PDT 2018


I am working on a QGIS plugin, that should use the module r.kappa from
GRASS. It looks like this in my plugin source code:

               {"classification": classificationLayer,
                "reference": referenceLayer,
                "title": 'ACCURACY ASSESSMENT',
                "-h": False,
                "-w": False,
                "GRASS_REGION_CELLSIZE_PARAMETER": cellSize,
                "GRASS_REGION_PARAMETER": None,
                "output": outputFile})

As an error, I get a QgsProcessingException saying 'There were errors
executing the algorithm'.

If I run the same manually in QGIS via the toolbox, everything works fine.
Both calls of the module (manually and via the plugin) look similar in the
log message panel. I have tried providing the inputs as QgsRasterLayer and
as full filenames/paths, without success. I don't think the error is in the
GRASS module, as it works fine when executed manually. Maybe someone
encountered a similar problem?

Thank you in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180806/137191bf/attachment-0001.html>

More information about the QGIS-Developer mailing list