2

When using the function Accumulated cost (isotropic) from the SAGA algorithms in QGIS i get the following error message:

An error has occurred while executing Python code:

AttributeError: 'QgsVectorLayer' object has no attribute 'bandCount' Traceback (most recent call last): File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmDialog.py", line 249, in accept msg = self.alg._checkParameterValuesBeforeExecuting() File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 233, in _checkParameterValuesBeforeExecuting return self.checkParameterValuesBeforeExecuting() File "/usr/share/qgis/python/plugins/processing/algs/saga/SagaAlgorithm212.py", line 343, in checkParameterValuesBeforeExecuting if layer.bandCount() > 1: AttributeError: 'QgsVectorLayer' object has no attribute 'bandCount'

Python version: 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] QGIS version: 2.18.0 Las Palmas, b7fe4bb2

I run QGIS on ubuntu. Any ideas on how to solve this? Should i file a bug report, if so where?

1

Raster layers have bands. The algorithm input is named "grid" - so I'd assume the tool should only accept rasters. If you used a raster and still get this error, it seems like you found a bug. If you used a vector, this might still be a bug because it probably shouldn't be possible to select a vector layer as input. (Assuming you used the tool from the toolbox and not from the Python console.)

  • yeah I think it only accepts two raster files. I managed to get the same task done with r.cost from GRASS which also accepts vector data as sources. – joaoal Nov 11 '16 at 10:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.