all other values category in renderer causes problems in dataset creation
Issue #668
resolved
Maybe just try to ignore the all other values category and print in the log that it was ignored. User should remove it, yes, but the QGIS renderer sets it per default
Traceback (most recent call last):
File "C:/Users/thielf54/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/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\algorithm\prepareclassificationdatasetfromcategorizedvector.py", line 79, in processAlgorithm
categories = Utils.categoriesFromCategorizedSymbolRenderer(renderer)
File "C:/Users/thielf54/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/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\utils.py", line 230, in categoriesFromCategorizedSymbolRenderer
categories = [Category(c.value(), c.label(), c.symbol().color().name()) for c in renderer.categories()]
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\utils.py", line 230, in <listcomp>
categories = [Category(c.value(), c.label(), c.symbol().color().name()) for c in renderer.categories()]
File "C:/Users/thielf54/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/thielf54/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/thielf54/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/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 641, in check_type
checker_func(argname, value, expected_type, memo)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 448, in check_union
raise TypeError('type of {} must be one of ({}); got {} instead'.
TypeError: type of argument "value" must be one of (int, str); got NoneType instead
Comments (3)
-
-
Can’t reproduce this in the current test version … please check
-
- changed status to resolved
resolves
#668→ <<cset ddd242c4e484>>
- Log in to comment
I think that really is a bug and I should handle “all other” category silently in the background.