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

Sophie Crommelinck sophie.crommelinck at gmail.com
Mon Aug 6 00:37:46 PDT 2018


I just noted that everything works fine, when the module r.kappa is run
once manually via the toolbox in QGIS before running the plugin. When I
open QGIS (I am using the latest QGIS 3.3.0 nightly build version) and run
the plugin directly, the GRASS module r.kappa in the plugin doesn't work.
When I open QGIS, run r.kappa via the toolbox and run the plugin then, the
GRASS module r.kappa in the plugin works fine. Not sure how to fix this.

Best,
Sophie

On Mon, 6 Aug 2018 at 08:10, Sophie Crommelinck <
sophie.crommelinck at gmail.com> wrote:

> Hello,
>
>
> 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:
>
> processing.run('grass7:r.kappa',
>                {"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,
>
> Sophie
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180806/5456e7ed/attachment.html>


More information about the QGIS-Developer mailing list