Wednesday, 7 March 2018

raster conversion - Error running r.thin in QGIS


I get the following error when running r.thin:



Traceback (most recent call last): File "C:/PROGRA~4/QGIS3/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 395, in processAlgorithm outputs[outName] = parameters[outName] NameError: name 'QgsProcessingOutputHtml' is not defined




Execution failed after 5.26 seconds


I looked at the Python script containing that section of code:


# Return outputs map
outputs = {}
for out in self.outputDefinitions():
outName = out.name()
if outName in parameters:
outputs[outName] = parameters[outName]
if isinstance(out, QgsProcessingOutputHtml):
self.convertToHtml(parameters[outName])


return outputs

Thinking that a function wasn't called to start with, I added this to the call for the function:


from qgis.core import (Qgis,
QgsRasterLayer,
QgsApplication,
QgsMapLayer,
QgsProcessingUtils,
QgsProcessing,

QgsMessageLog,
QgsVectorFileWriter,
QgsProcessingAlgorithm,
QgsProcessingParameterDefinition,
QgsProcessingException,
QgsProcessingOutputHtml,

I still get the error. Is this a missing function, or is does this function exist anymore? I loaded the latest QGIS version (3.0.1).




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...