"Fraction From Vector" crashes when used with a temporary layer
The function "Fraction From Vector" crashes when the input vector is not saved on disk, but only available as a temporary file. QGIS allows to save results as temporary file. The error message does not make clear what the problem is.
Processing algorithm… Algorithm 'Fraction from Vector' starting… Input parameters: { 'classDefinition' : '', 'classIdField' : 'BSG', 'grid' : 'M:/03_chapter_01/01_data/01_berlin_brandenburg/09_s2_time_series_2017_2018_for_processing/X0069_Y0043/01_considered_data/2017_2018_b50.tif', 'minDominantCoverage' : 0, 'minOverallCoverage' : 0, 'outFraction' : 'C:/Users/schugfrx/AppData/Local/Temp/processing_74f212dd942c426686616ad07a50c198/7c794c343f144038b2b7c36224154aab/outFraction.bsq', 'oversampling' : 10, 'vector' : 'MultiPolygon?crs=USER:100035&field=gml_id:string(80)&field=BEZIRK:string(80)&field=WOZ_NAME:string(80)&field=GRZ_NAME:string(80)&field=STSTRNAME:string(124)&field=TYPKLAR:string(103)&field=FLALLE:double(23,15)&field=STR_FLGES:double(23,15)&field=VG:double(23,15)&field=VG_0:double(23,15)&field=PROBAU:double(23,15)&field=PROVGNEU:double(23,15)&field=PROVGNEU_0:double(23,15)&field=KL1:double(23,15)&field=KL2:double(23,15)&field=KL3:double(23,15)&field=KL4:double(23,15)&field=isRail:integer(2)&field=ADE:long(11)&field=GF:long(11)&field=BSG:long(11)&field=RS:string(12)&field=AGS:string(12)&field=SDV_RS:string(12)&field=GEN:string(50)&field=BEZ:string(50)&field=IBZ:long(11)&field=BEM:string(75)&field=NBD:string(4)&field=SN_L:string(2)&field=SN_R:string(1)&field=SN_K:string(2)&field=SN_V1:string(2)&field=SN_V2:string(2)&field=SN_G:string(3)&field=FK_S3:string(2)&field=NUTS:string(5)&field=RS_0:string(12)&field=AGS_0:string(12)&field=WSK:date(10)&field=DEBKG_ID:string(16)&field=layer:string(100)&field=path:string(200)&uid={cd28fbf8-e640-4d97-a7d4-80fab2955cb4}' }
Traceback (most recent call last): File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 117, in processAlgorithm result = self.processAlgorithm_() File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 769, in processAlgorithm_ classification=self.getParameterVectorClassification(), File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 330, in getParameterVectorClassification classDefinition=self.getParameterClassDefinition(), File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 609, in getParameterClassDefinition classes = numpy.max(vector.uniqueValues(attribute=classIdField)) File "C:\Users\schugfrx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages\hubflow\core.py", line 1891, in uniqueValues vector = openVectorDataset(filename=self.filename(), layerNameOrIndex=self.layer()) File "C:\Users\schugfrx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages\hubdc\core.py", line 2131, in openVectorDataset raise errors.FileNotExistError(filename) hubdc.hubdcerrors.FileNotExistError: MultiPolygon?crs=USER:100035&field=gml_id:string(80)&field=BEZIRK:string(80)&field=WOZ_NAME:string(80)&field=GRZ_NAME:string(80)&field=STSTRNAME:string(124)&field=TYPKLAR:string(103)&field=FLALLE:double(23,15)&field=STR_FLGES:double(23,15)&field=VG:double(23,15)&field=VG_0:double(23,15)&field=PROBAU:double(23,15)&field=PROVGNEU:double(23,15)&field=PROVGNEU_0:double(23,15)&field=KL1:double(23,15)&field=KL2:double(23,15)&field=KL3:double(23,15)&field=KL4:double(23,15)&field=isRail:integer(2)&field=ADE:long(11)&field=GF:long(11)&field=BSG:long(11)&field=RS:string(12)&field=AGS:string(12)&field=SDV_RS:string(12)&field=GEN:string(50)&field=BEZ:string(50)&field=IBZ:long(11)&field=BEM:string(75)&field=NBD:string(4)&field=SN_L:string(2)&field=SN_R:string(1)&field=SN_K:string(2)&field=SN_V1:string(2)&field=SN_V2:string(2)&field=SN_G:string(3)&field=FK_S3:string(2)&field=NUTS:string(5)&field=RS_0:string(12)&field=AGS_0:string(12)&field=WSK:date(10)&field=DEBKG_ID:string(16)&field=layer:string(100)&field=path:string(200)&uid={cd28fbf8-e640-4d97-a7d4-80fab2955cb4}
Traceback (most recent call last): File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 117, in processAlgorithm result = self.processAlgorithm_() File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 769, in processAlgorithm_ classification=self.getParameterVectorClassification(), File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 330, in getParameterVectorClassification classDefinition=self.getParameterClassDefinition(), File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 609, in getParameterClassDefinition classes = numpy.max(vector.uniqueValues(attribute=classIdField)) File "C:\Users\schugfrx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages\hubflow\core.py", line 1891, in uniqueValues vector = openVectorDataset(filename=self.filename(), layerNameOrIndex=self.layer()) File "C:\Users\schugfrx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages\hubdc\core.py", line 2131, in openVectorDataset raise errors.FileNotExistError(filename) hubdc.hubdcerrors.FileNotExistError: MultiPolygon?crs=USER:100035&field=gml_id:string(80)&field=BEZIRK:string(80)&field=WOZ_NAME:string(80)&field=GRZ_NAME:string(80)&field=STSTRNAME:string(124)&field=TYPKLAR:string(103)&field=FLALLE:double(23,15)&field=STR_FLGES:double(23,15)&field=VG:double(23,15)&field=VG_0:double(23,15)&field=PROBAU:double(23,15)&field=PROVGNEU:double(23,15)&field=PROVGNEU_0:double(23,15)&field=KL1:double(23,15)&field=KL2:double(23,15)&field=KL3:double(23,15)&field=KL4:double(23,15)&field=isRail:integer(2)&field=ADE:long(11)&field=GF:long(11)&field=BSG:long(11)&field=RS:string(12)&field=AGS:string(12)&field=SDV_RS:string(12)&field=GEN:string(50)&field=BEZ:string(50)&field=IBZ:long(11)&field=BEM:string(75)&field=NBD:string(4)&field=SN_L:string(2)&field=SN_R:string(1)&field=SN_K:string(2)&field=SN_V1:string(2)&field=SN_V2:string(2)&field=SN_G:string(3)&field=FK_S3:string(2)&field=NUTS:string(5)&field=RS_0:string(12)&field=AGS_0:string(12)&field=WSK:date(10)&field=DEBKG_ID:string(16)&field=layer:string(100)&field=path:string(200)&uid={cd28fbf8-e640-4d97-a7d4-80fab2955cb4}
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 131, in processAlgorithm raise Exception('unexpected error') Exception: unexpected error
Execution failed after 0.31 seconds
Loading resulting layers Algorithm 'Fraction from Vector' finished
Comments (6)
-
-
- changed status to open
-
-
assigned issue to
-
assigned issue to
-
- changed status to wontfix
it is the responsibility of the user to convert QGIS mem layers to OGR supported format
-
- changed status to on hold
-
- changed status to closed
new/overhauled algorithms will support temp layer
- Log in to comment
This is because hubdc is unable to handle the QgsVectorDataProvider type "memory" (which is different to the OGR "Memory" driver).
As quick-fix QgsVectorLayers with providers different to OGR could be copied into a temporary OGR in-memory representation either using "/vsimem/" or OGR "Memory".