semiautomaticgit / SemiAutomaticClassificationPlugin

https://fromgistors.blogspot.com/p/semi-automatic-classification-plugin.html
Other
136 stars 50 forks source link

SCP 7.2.0 Python Error 'NoneType' object is not subscriptable #146

Closed elpibedeliceo closed 3 years ago

elpibedeliceo commented 3 years ago

Dear @semiautomaticgit i have this BUG when i tried to preprocess (radiometric correction and atmospheric correction) a Landsat Image, the message it throws at me is the following:

TypeError: 'NoneType' object is not subscriptable Traceback (most recent call last): File "C:/Users/Maximiliano/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\landsatTab.py", line 640, in performLandsatCorrection self.landsat(cfg.ui.label_26.text(), o) File "C:/Users/Maximiliano/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\landsatTab.py", line 331, in landsat LDNmList = cfg.utls.findDNmin(tPMDN, NoData) File "C:/Users/Maximiliano/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 2006, in findDNmin o = cfg.utls.multiProcessRaster(rasterPath = inputRaster, functionBand = 'No', functionRaster = cfg.utls.rasterUniqueValuesWithSum, nodataValue = noDataVal, progressMessage = cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'DOS1 calculation'), deleteArray = 'No', parallel = cfg.parallelArray) File "C:/Users/Maximiliano/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 4791, in multiProcessRaster fArg = functionBandArgument[p] TypeError: 'NoneType' object is not subscriptable

error 2

error 1

Thanks Luca!

semiautomaticgit commented 3 years ago

Thank you, it should be related to this https://github.com/semiautomaticgit/SemiAutomaticClassificationPlugin/issues/145 I'll fix this

semiautomaticgit commented 3 years ago

It should be fixed in version 7.2.1. Please update the plugin