semiautomaticgit/SemiAutomaticClassificationPlugin

AttributeError: 'NoneType' object has no attribute 'bandCount'

EASC opened this issue · 3 comments

EASC commented

Hello, I have a problem when I try to load a multiband image.

When I install SemiAutomaticClassification Plugin, there are some warnings detailed in
scp_warnings.txt

When I try to load a multiband image, next error comes out:

2020-04-19T19:18:46 WARNING Traceback (most recent call last):
File "/home/andres/.local/share/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/maininterface/bandsetTab.py", line 377, in rasterLayerName
cfg.bst.rasterToBandName(imgNm)
File "/home/andres/.local/share/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/maininterface/bandsetTab.py", line 1027, in rasterToBandName
b = r.bandCount()
AttributeError: 'NoneType' object has no attribute 'bandCount'

I'm working on Ubuntu 18.04
QGIS 3.10
pip version 9.0.1
Python 3.6.9

Could it be a bug in SCP plugin?
Thank you for your help.

Same issue. Fresh install does not fix.

Python log:

AttributeError: 'NoneType' object has no attribute 'bandCount'
Traceback (most recent call last):
File ".local/share/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin-master/maininterface/bandsetTab.py", line 377, in rasterLayerName
cfg.bst.rasterToBandName(imgNm)
File ".local/share/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin-master/maininterface/bandsetTab.py", line 1027, in rasterToBandName
b = r.bandCount()
AttributeError: 'NoneType' object has no attribute 'bandCount'

Python version: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
QGIS version: 3.12.2-București București, ea0f8e5ae1

Python Path:
/usr/share/qgis/python
.local/share/QGIS/QGIS3/profiles/default/python
.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
.local/lib/python3.6/site-packages
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/.local/share/QGIS/QGIS3/profiles/default/python

SCP log:

SemiAutomaticClass Version 6.4.3 - Greenbelt - QGIS v. 31202 L:en - OS Linux - 64bit =Yes
2020-04-23 14.20.10.143215 SemiAutomaticClassificationPlugin-master.core.input-menuIndex 435
2020-04-23 14.20.10.241525 SemiAutomaticClassificationPlugin-master.core.input-menuClicked 446
2020-04-23 14.20.15.721040 SemiAutomaticClassificationPlugin-master.core.input-refreshRasterLayer 72 raster layers refreshed
2020-04-23 14.20.18.959377 SemiAutomaticClassificationPlugin-master.core.utils-clearTable 6730
2020-04-23 14.20.18.960641 SemiAutomaticClassificationPlugin-master.maininterface.bandsetTab-clearBandSet 408 band set cleared
2020-04-23 14.20.18.962265 SemiAutomaticClassificationPlugin-master.core.utils-selectLayerbyName 5506 layer selected: 20200407 V1 Proto Balaklava_transparent_mosaic_group1.tif
2020-04-23 14.20.19.883172 SemiAutomaticClassificationPlugin-master.core.utils-clearTable 6730
2020-04-23 14.20.19.884483 SemiAutomaticClassificationPlugin-master.maininterface.bandsetTab-rasterBandName 1019 raster band name checklist created
2020-04-23 14.20.20.872565 SemiAutomaticClassificationPlugin-master.maininterface.bandsetTab-selectAllBands 1101 all bands clicked
2020-04-23 14.20.25.438527 SemiAutomaticClassificationPlugin-master.core.input-menuIndex 435
2020-04-23 14.20.25.609370 SemiAutomaticClassificationPlugin-master.core.input-menuIndex 435
2020-04-23 14.20.26.085352 SemiAutomaticClassificationPlugin-master.core.input-menuClicked 446
2020-04-23 14.20.27.785004 SemiAutomaticClassificationPlugin-master.core.input-menuClicked 446
2020-04-23 14.20.29.459109 SemiAutomaticClassificationPlugin-master.core.input-menuIndex 435
2020-04-23 14.20.29.572584 SemiAutomaticClassificationPlugin-master.core.input-menuClicked 446
2020-04-23 14.20.29.977494 SemiAutomaticClassificationPlugin-master.core.input-menuIndex 435
2020-04-23 14.20.30.080698 SemiAutomaticClassificationPlugin-master.core.input-menuClicked 446

I'm closing this because of the new version 7.
If you still get the same issue, please reopen it