Closed zhulei1024 closed 3 years ago
I got this error too. For me, it shows:
UnboundLocalError: local variable 'rStat' referenced before assignment Traceback (most recent call last): File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/dock/scpdock.py", line 2411, in saveROItoShapefile cfg.utls.calculateSignature(cfg.shpLay, cfg.bandSetsList[bandSetNumber][8], [self.ROILastID], cfg.ROIMacroID, cfg.ROIMacroClassInfo, cfg.ROIID, cfg.ROIInfo, 50, 40, 'No', 'No', UID, bandSetNumber = bandSetNumber) File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/utils.py", line 1584, in calculateSignature rStatStr = str(rStat) UnboundLocalError: local variable 'rStat' referenced before assignment
Python version: 3.9.4 (v3.9.4:1f2e3088f3, Apr 4 2021, 12:32:44) [Clang 6.0 (clang-600.0.57)] QGIS version: 3.18.3-Zürich Zürich, exported
Python Path: /Applications/QGIS3.18.app/Contents/MacOS/../Resources/python /Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS3.18.app/Contents/MacOS/../Resources/python/plugins /Library/Frameworks/Python.framework/Versions/3.9/lib/python39.zip /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9 /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages /Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python
I updated de plugin, but now it shows this error:
An error has occurred while executing Python code:
NameError: name 'N' is not defined multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/utils.py", line 4859, in processRasterDev oo = functionRaster(gdalBandList, array, nodataMask, bSY, x, y, outputArrayFile, functionBandArgument, functionVariable, outputBandNumber) File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/utils.py", line 3713, in calculateRaster o = eval(f) File "", line 1, in NameError: name 'N' is not defined """
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/maininterface/landsatTab.py", line 641, in performLandsatCorrection
self.landsat(cfg.ui.label_26.text(), o)
File "/Users/hm/Library/Application Support/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 "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/utils.py", line 5247, in multiProcessRaster
res = r[0].get()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
NameError: name 'N' is not defined
Any idea?
I updated de plugin, but now it shows this error:
An error has occurred while executing Python code:
NameError: name 'N' is not defined multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/utils.py", line 4859, in processRasterDev oo = functionRaster(gdalBandList, array, nodataMask, bSY, x, y, outputArrayFile, functionBandArgument, functionVariable, outputBandNumber) File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/utils.py", line 3713, in calculateRaster o = eval(f) File "", line 1, in NameError: name 'N' is not defined """
The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/maininterface/landsatTab.py", line 641, in performLandsatCorrection self.landsat(cfg.ui.label_26.text(), o) File "/Users/hm/Library/Application Support/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 "/Users/hm/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/utils.py", line 5247, in multiProcessRaster res = r[0].get() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 771, in get raise self._value NameError: name 'N' is not defined
Any idea?
I think it is a QGIS installation issue, please read https://semiautomaticclassificationmanual.readthedocs.io/en/latest/installation_mac.html
I have an error when save the temporary ROI to new training input T T Thanks in advance!
It should be fixed in SCP version 7.8.24, please update the plugin.
bug.txt I have an error when save the temporary ROI to new training input T T Thanks in advance!
It should be fixed in SCP version 7.8.24, please update the plugin.
I updated the version, and it has been solved!! Thanks a lot!
bug.txt I have an error when save the temporary ROI to new training input T T Thanks in advance!
It should be fixed in SCP version 7.8.24, please update the plugin.
I updated the version, and it has been solved!! Thanks a lot!
You are very welcome!
bug.txt
I have an error when save the temporary ROI to new training input T T Thanks in advance!