When i try to classify a raster file with a trained kNN model and i don't have at least one shapefile available i get the following error:
2019-05-20T09:54:03 WARNING Traceback (most recent call last):
File "C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\dzetsaka\dzetsaka.py", line 536, in runMagic
inShape=inShape.dataProvider().dataSourceUri().split('|')[0] # Remove layerid=0 from SHP Path
AttributeError: 'NoneType' object has no attribute 'dataProvider'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\dzetsaka\dzetsaka.py", line 556, in runMagic
QgsMessageLog.logMessage('inShape is : '+inShape)
TypeError: can only concatenate str (not "NoneType") to str
Having one shapefile available, even if not related to the classification, fixes this somehow.
I have uploaded the version 3.4.5 to the qgis repository, so It should be available very soon in your Qgis.
Thanks @fafasd for your feedback :+1: :smile:
When i try to classify a raster file with a trained kNN model and i don't have at least one shapefile available i get the following error:
Having one shapefile available, even if not related to the classification, fixes this somehow.