On Mon, 6 Aug 2018 at 17:38, Sophie Crommelinck
<[email protected]> wrote:
>
> 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 
> <[email protected]> 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'.

Can you try putting somewhere near the start of your script:

from processing.algs.grass7.Grass7Utils import Grass7Utils
assert Grass7Utils.installedVersion()

And see if the assert passes, and whether that fixes your issue?

Nyall
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to