Closed van543 closed 9 months ago
Hello, the error could be related to SNAP. Please copy the log file following these steps https://semiautomaticclassificationmanual.readthedocs.io/en/latest/faq.html#how-can-i-report-an-error
I have the exact same problem and I can give you my log file, would be great if you could check it out Log1.txt
I can always open a new issue tab if necessary, thanks for your time
Thank you for the log file @carlosgmv19 . It seems that the error is on the SNAP side ('str' object has no attribute 'dataProvider' is because no output is created from Random Forest). Please check that the training input doesn't include ROIs created with the region growing algorithm (apparently SNAP doesn't use those polygons). Also you could check if launching Random Forest directly in SNAP works with the same input data.
AttributeError: 'str' object has no attribute 'dataProvider' how to solve this error
log file log file.txt
AttributeError: 'str' object has no attribute 'dataProvider' how to solve this error
Please update the plugin. Also please check if SNAP software is correctly installed.
Hi Luca, First thanks for the plugin it'is very usefull !! I have usually the same error (str error) when I try to do a random forest classification. Today I have a new one... errorLog.txt When I follow and use the tutorial, it's working. So I assume that the snap software is correctly installed. It's more about the data I think. Do you have any idea to solve it ?
Hi @nicolas-aumercier , you are very welcome. About your issue, please update the plugin to the latest version. Also, please check that the training input doesn't include ROIs created with the region growing algorithm, but only polygons that were drawn manually.
After Random forest Classification The classified file showing only two Classifications Out of 6 i given classes for classification Please solve this problem
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!
Hi,
when i want to classify a Image with Random Forrest, i always become this error. Classifying with minimum distance is working. AttributeError: 'str' object has no attribute 'dataProvider'
AttributeError: 'str' object has no attribute 'dataProvider' Traceback (most recent call last): File "C:/Users/Vanessa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\randomForestTab.py", line 224, in performRandomForest self.randomForestClassification(bandSetNumber = bs, classPath = cfg.classRF) File "C:/Users/Vanessa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\randomForestTab.py", line 420, in randomForestClassification cfg.classTab.applyClassSymbology(r, macroclass, cfg.qmlFl, sL) File "C:/Users/Vanessa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\classificationTab.py", line 280, in applyClassSymbology cfg.utls.rasterSymbol(classificationRaster, signatureList, macroclassCheck) File "C:/Users/Vanessa/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 644, in rasterSymbol lR = cfg.qgisCoreSCP.QgsPalettedRasterRenderer(classLayer.dataProvider(), cLB, cL) AttributeError: 'str' object has no attribute 'dataProvider'
Python-Version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS-Version: 3.10.14-A Coruña A Coruña, 8374282d2a