1

Any idea what this error means?

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

I get this error when I am trying to save a ROI in QGIS (within the SPC plugin).

I have uploaded a JPG image which comes from my iPhone so it's not georeferenced, and it does not need to be, I just need to classify the image and get an area count on one class.

When asked for a CRS I selected wgs84 since it's the default. I am using the tool box since I do not use python because I am not familiar with programming.

Here is the message I am getting:

Traceback (most recent call last):
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\classificationdock\classificationdock.py", line 2240, in saveROItoShapefile
            cfg.utls.calculateSignature(cfg.shpLay, cfg.rstrNm, [self.ROILastID], cfg.ROIMacroID, cfg.ROIMacroClassInfo, cfg.ROIID, cfg.ROIInfo, 50, 40, "No", "No", UID)
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 1690, in calculateSignature
            oList = cfg.utls.rasterToBands(tS, cfg.tmpDir, None, "No", cfg.bndSetMultAddFactorsList)
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 3243, in rasterToBands
            iBC = cfg.utls.getNumberBandRaster(rasterPath)
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 4840, in getNumberBandRaster
            number = rD.RasterCount
        AttributeError: 'NoneType' object has no attribute 'RasterCoun
  • Same issue with SCP. We should probably ask them directly? – Rion Lerm Apr 25 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.