better error messages: wrong renderer
Issue #740
resolved
Traceback (most recent call last):
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 903, in wrapper
retval = func(*args, **kwargs)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\algorithm\classificationperformancesimplealgorithm.py", line 84, in processAlgorithm
result = self.runAlg(alg, parameters, None, feedback2, context, True)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 903, in wrapper
retval = func(*args, **kwargs)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\enmapalgorithm.py", line 596, in runAlg
return processing.run(algOrName, parameters, onFinish, feedback, context, is_child_algorithm)
File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python/plugins\processing\tools\general.py", line 116, in run
return Processing.runAlgorithm(algOrName, parameters, onFinish=post_process, feedback=feedback, context=context)
File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python/plugins\processing\core\Processing.py", line 164, in runAlgorithm
ok, msg = alg.checkParameterValues(parameters, context)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 903, in wrapper
retval = func(*args, **kwargs)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\algorithm\classificationperformancestratifiedalgorithm.py", line 78, in checkParameterValues
self.checkCategories(parameters, context)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 903, in wrapper
retval = func(*args, **kwargs)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\algorithm\classificationperformancestratifiedalgorithm.py", line 60, in checkCategories
categoriesPrediction = Utils.categoriesFromPalettedRasterRenderer(classification.renderer())
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 902, in wrapper
check_argument_types(memo)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 748, in check_argument_types
raise exc from None
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 746, in check_argument_types
check_type(description, value, expected_type, memo)
File "C:\Users/Gauri/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 668, in check_type
raise TypeError(
TypeError: type of argument "renderer" must be qgis._core.QgsPalettedRasterRenderer; got qgis._core.QgsSingleBandGrayRenderer instead
Comments (2)
-
reporter -
reporter - changed status to resolved
- Log in to comment
Benjamin, this should already be fixed, but I can’t say for sure without the actual data. You may test this yourself to make sure. Either in the GUI or use the unittest below: