hubflow Error: TypeError: unexpected value: 14

Issue #629 resolved
Benjamin Jakimow created an issue

The following error is raised when starting the “Create Test Classification” processing algorithm in the upcoming QGIS 3.18

QGIS version: 3.17.0-Master
QGIS code revision: 46dbd8b2d6
Qt version: 5.11.2
GDAL version: 3.3.0dev
GEOS version: 3.8.1-CAPI-1.13.3
PROJ version: Rel. 8.0.0, March 1st, 2021
Processing algorithm
Algorithm 'Create Test Classification Map' starting
Input parameters:
{ 'outClassification' : 'TEMPORARY_OUTPUT' }

Traceback (most recent call last):
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 155, in processAlgorithm
result = self.processAlgorithm_()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 548, in processAlgorithm_
gridOrResolution=Raster(enmapboxtestdata.enmap).grid())
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxtestdata\__init__.py", line 41, in createClassification
Classification.fromClassification(filename=filename, classification=vectorClassification, grid=grid)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 3936, in fromClassification
applier.apply(operatorType=_ClassificationFromClassification, classification=classification, masks=masks)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 55, in apply
overwrite=self.kwargs.get('overwrite', True), *ufuncArgs, **ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 979, in apply
results = self._runProcessSubgrids()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1043, in _runProcessSubgrids
blockResults.append(_Worker.processSubgrid(**kwargs))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1126, in processSubgrid
nxblock=nx)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1272, in _apply
blockResult = self.ufunc(*self._ufuncArgs, **self._ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 4194, in ufunc
array = self.flowClassificationArray('classification', classification=classification)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 260, in flowClassificationArray
fractionArray = self.flowFractionArray(name=name, fraction=classification, overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 351, in flowFractionArray
overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 320, in fractionArray
array.append(oversampledRaster.array(overlap=overlap, resampleAlg=gdal.GRA_Average))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 138, in array
multithread=multithread,)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1693, in array
multithread=multithread, srcNodata=noDataValue)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1548, in warp
if not resampleAlg in ResampleAlgHandler.warpResampleAlgorithms():
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3228, in warpResampleAlgorithms
return [name for name in cls.resampleAlgorithms() if not name in ['gauss']]
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3222, in resampleAlgorithms
gdal.__dict__.items() if
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3220, in <listcomp>
resampleAlgs = [cls.toString(resampleAlg=resampleAlg) for resampleAlg in
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3214, in toString
raise TypeError('unexpected value: {}'.format(resampleAlg))
TypeError: unexpected value: 14

Traceback (most recent call last):
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 155, in processAlgorithm
result = self.processAlgorithm_()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 548, in processAlgorithm_
gridOrResolution=Raster(enmapboxtestdata.enmap).grid())
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxtestdata\__init__.py", line 41, in createClassification
Classification.fromClassification(filename=filename, classification=vectorClassification, grid=grid)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 3936, in fromClassification
applier.apply(operatorType=_ClassificationFromClassification, classification=classification, masks=masks)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 55, in apply
overwrite=self.kwargs.get('overwrite', True), *ufuncArgs, **ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 979, in apply
results = self._runProcessSubgrids()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1043, in _runProcessSubgrids
blockResults.append(_Worker.processSubgrid(**kwargs))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1126, in processSubgrid
nxblock=nx)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1272, in _apply
blockResult = self.ufunc(*self._ufuncArgs, **self._ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 4194, in ufunc
array = self.flowClassificationArray('classification', classification=classification)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 260, in flowClassificationArray
fractionArray = self.flowFractionArray(name=name, fraction=classification, overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 351, in flowFractionArray
overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 320, in fractionArray
array.append(oversampledRaster.array(overlap=overlap, resampleAlg=gdal.GRA_Average))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 138, in array
multithread=multithread,)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1693, in array
multithread=multithread, srcNodata=noDataValue)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1548, in warp
if not resampleAlg in ResampleAlgHandler.warpResampleAlgorithms():
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3228, in warpResampleAlgorithms
return [name for name in cls.resampleAlgorithms() if not name in ['gauss']]
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3222, in resampleAlgorithms
gdal.__dict__.items() if
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3220, in <listcomp>
resampleAlgs = [cls.toString(resampleAlg=resampleAlg) for resampleAlg in
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3214, in toString
raise TypeError('unexpected value: {}'.format(resampleAlg))
TypeError: unexpected value: 14

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 169, in processAlgorithm
raise Exception('unexpected error')
Exception: unexpected error

Execution failed after 0.72 seconds

Loading resulting layers
Algorithm 'Create Test Classification Map' finished
QGIS version: 3.17.0-Master
QGIS code revision: 46dbd8b2d6
Qt version: 5.11.2
GDAL version: 3.3.0dev
GEOS version: 3.8.1-CAPI-1.13.3
PROJ version: Rel. 8.0.0, March 1st, 2021
Processing algorithm
Algorithm 'Create Test Classification Map' starting
Input parameters:
{ 'outClassification' : 'C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/outputs/trulla.bsq' }

Traceback (most recent call last):
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 155, in processAlgorithm
result = self.processAlgorithm_()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 548, in processAlgorithm_
gridOrResolution=Raster(enmapboxtestdata.enmap).grid())
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxtestdata\__init__.py", line 41, in createClassification
Classification.fromClassification(filename=filename, classification=vectorClassification, grid=grid)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 3936, in fromClassification
applier.apply(operatorType=_ClassificationFromClassification, classification=classification, masks=masks)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 55, in apply
overwrite=self.kwargs.get('overwrite', True), *ufuncArgs, **ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 979, in apply
results = self._runProcessSubgrids()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1043, in _runProcessSubgrids
blockResults.append(_Worker.processSubgrid(**kwargs))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1126, in processSubgrid
nxblock=nx)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1272, in _apply
blockResult = self.ufunc(*self._ufuncArgs, **self._ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 4194, in ufunc
array = self.flowClassificationArray('classification', classification=classification)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 260, in flowClassificationArray
fractionArray = self.flowFractionArray(name=name, fraction=classification, overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 351, in flowFractionArray
overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 320, in fractionArray
array.append(oversampledRaster.array(overlap=overlap, resampleAlg=gdal.GRA_Average))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 138, in array
multithread=multithread,)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1693, in array
multithread=multithread, srcNodata=noDataValue)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1548, in warp
if not resampleAlg in ResampleAlgHandler.warpResampleAlgorithms():
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3228, in warpResampleAlgorithms
return [name for name in cls.resampleAlgorithms() if not name in ['gauss']]
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3222, in resampleAlgorithms
gdal.__dict__.items() if
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3220, in <listcomp>
resampleAlgs = [cls.toString(resampleAlg=resampleAlg) for resampleAlg in
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3214, in toString
raise TypeError('unexpected value: {}'.format(resampleAlg))
TypeError: unexpected value: 14

Traceback (most recent call last):
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 155, in processAlgorithm
result = self.processAlgorithm_()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 548, in processAlgorithm_
gridOrResolution=Raster(enmapboxtestdata.enmap).grid())
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxtestdata\__init__.py", line 41, in createClassification
Classification.fromClassification(filename=filename, classification=vectorClassification, grid=grid)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 3936, in fromClassification
applier.apply(operatorType=_ClassificationFromClassification, classification=classification, masks=masks)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 55, in apply
overwrite=self.kwargs.get('overwrite', True), *ufuncArgs, **ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 979, in apply
results = self._runProcessSubgrids()
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1043, in _runProcessSubgrids
blockResults.append(_Worker.processSubgrid(**kwargs))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1126, in processSubgrid
nxblock=nx)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 1272, in _apply
blockResult = self.ufunc(*self._ufuncArgs, **self._ufuncKwargs)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 4194, in ufunc
array = self.flowClassificationArray('classification', classification=classification)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 260, in flowClassificationArray
fractionArray = self.flowFractionArray(name=name, fraction=classification, overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 351, in flowFractionArray
overlap=overlap)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 320, in fractionArray
array.append(oversampledRaster.array(overlap=overlap, resampleAlg=gdal.GRA_Average))
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\applier.py", line 138, in array
multithread=multithread,)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1693, in array
multithread=multithread, srcNodata=noDataValue)
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 1548, in warp
if not resampleAlg in ResampleAlgHandler.warpResampleAlgorithms():
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3228, in warpResampleAlgorithms
return [name for name in cls.resampleAlgorithms() if not name in ['gauss']]
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3222, in resampleAlgorithms
gdal.__dict__.items() if
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3220, in <listcomp>
resampleAlgs = [cls.toString(resampleAlg=resampleAlg) for resampleAlg in
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdc\core.py", line 3214, in toString
raise TypeError('unexpected value: {}'.format(resampleAlg))
TypeError: unexpected value: 14

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/geo_beja/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 169, in processAlgorithm
raise Exception('unexpected error')
Exception: unexpected error

Execution failed after 0.37 seconds

Loading resulting layers
Algorithm 'Create Test Classification Map' finished

Comments (1)

  1. Log in to comment