semiautomaticgit / SemiAutomaticClassificationPlugin

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

Python output error during supervised classification #330

Open Hueching0411 opened 6 months ago

Hueching0411 commented 6 months ago

After I click 'RUN' and set the file location, the classification could not be run and the process keep fail. The following python error occurred and I do not understand the meaning.

2023-12-27T18:53:24 WARNING Traceback (most recent call last): File "C:\Users/ching/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\interface\classification_tab.py", line 143, in run_classification_action run_classifier() File "C:\Users/ching/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\interface\classification_tab.py", line 487, in run_classifier if output is None: UnboundLocalError: local variable 'output' referenced before assignment

Could anyone help to solve this problem?

semiautomaticgit commented 6 months ago

Hello @Hueching0411 , thank you for reporting the issue. Please update both SCP and Remotior Sensus. If you still get the same issue, please check the checkbox "Records detailed events in a log file" and copy the log file as described here https://semiautomaticclassificationmanual.readthedocs.io/en/latest/faq.html#how-can-i-report-an-error

MatLudvik commented 6 months ago

Hi, I encountered the exact same error today. I tried updating everything and creating a completely new project, but the error kept appearing. In my case the only thing that helped was to create completely new training data.

varshithvn2 commented 2 months ago

I'm facing the same issue.

Maximum Likelihood works fine, But rest of the algorithm shows same error. Random Forest has a different issue, "RandomForestClassifier" Not Found

semiautomaticgit commented 2 months ago

please check the checkbox "Records detailed events in a log file" and copy the log file as described here https://semiautomaticclassificationmanual.readthedocs.io/en/latest/faq.html#how-can-i-report-an-error

Hello @varshithvn2 , it could be an installation issue. Please check the checkbox "Records detailed events in a log file" and copy the log file as described here https://semiautomaticclassificationmanual.readthedocs.io/en/latest/faq.html#how-can-i-report-an-error