Closed SHAYKE80 closed 8 months ago
Hello, I get the following python error while trying to preprocess landsat. attached a screen shot of my definitions, followed by the error response:
An error has occurred while executing Python code:
TypeError: 'NoneType' object is not subscriptable multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "C:\PROGRA~1\QGIS33~2.1\apps\Python39\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 4953, in processRasterDev cfg.utls.logToFile(str(name) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'a[0, 0] ' + str(a[0, 0] ) ) TypeError: 'NoneType' object is not subscriptable """
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\landsatTab.py", line 667, in performLandsatCorrection self.landsat(cfg.ui.label_26.text(), o) File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\landsatTab.py", line 345, in landsat o = cfg.utls.multiProcessRaster(rasterPath = tPMDN, functionBand = 'No', functionRaster = cfg.utls.calculateRaster, outputRasterList = oM, nodataValue = NoData, functionBandArgument = argumentList, functionVariable = variableList, progressMessage = cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Conversion'), parallel = cfg.parallelRaster) File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 5472, in multiProcessRaster res = r[0].get() File "C:\PROGRA~1\QGIS33~2.1\apps\Python39\lib\multiprocessing\pool.py", line 771, in get raise self._value TypeError: 'NoneType' object is not subscriptable
Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS version: 3.32.1-Lima Lima, 4a078ecf63
Hello @SHAYKE80 , thank you for reporting this. I'll look into it.
I'm closing this because of the new version 8 of SCP. Please reopen it if it is still relevant in the new version. Thank you!
Hello, I get the following python error while trying to preprocess landsat. attached a screen shot of my definitions, followed by the error response:
An error has occurred while executing Python code:
TypeError: 'NoneType' object is not subscriptable multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "C:\PROGRA~1\QGIS33~2.1\apps\Python39\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 4953, in processRasterDev cfg.utls.logToFile(str(name) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'a[0, 0] ' + str(a[0, 0] ) ) TypeError: 'NoneType' object is not subscriptable """
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\landsatTab.py", line 667, in performLandsatCorrection self.landsat(cfg.ui.label_26.text(), o) File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\landsatTab.py", line 345, in landsat o = cfg.utls.multiProcessRaster(rasterPath = tPMDN, functionBand = 'No', functionRaster = cfg.utls.calculateRaster, outputRasterList = oM, nodataValue = NoData, functionBandArgument = argumentList, functionVariable = variableList, progressMessage = cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Conversion'), parallel = cfg.parallelRaster) File "C:\Users/hyd2023/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 5472, in multiProcessRaster res = r[0].get() File "C:\PROGRA~1\QGIS33~2.1\apps\Python39\lib\multiprocessing\pool.py", line 771, in get raise self._value TypeError: 'NoneType' object is not subscriptable
Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS version: 3.32.1-Lima Lima, 4a078ecf63