5

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).

  • I'm getting a similar error when I try to a Grass (r.watershed) algorithm in Processing Modeler. But the algorithm result does get produced. So if you ask to save the output, the file gets saved. – Daniel Mar 29 '18 at 19:11
  • As per the help center it is OK to try and reproduce software problems in a Q&A here, but if you think this is a bug then be sure to submit it to the QGIS development team. Please post a link to the bug report here. – underdark Feb 15 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.