From 59292b47c7768a954dbe1a5734be44be5317fefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Tveite?= Date: Wed, 13 Nov 2019 11:47:28 +0100 Subject: [PATCH] Update CreateConstantRaster.py Cast cols (and rows) to int to fix the error. Fixes: #32827 --- python/plugins/processing/algs/qgis/CreateConstantRaster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/plugins/processing/algs/qgis/CreateConstantRaster.py b/python/plugins/processing/algs/qgis/CreateConstantRaster.py index 9ab14e2c288..20c5b3c4fce 100644 --- a/python/plugins/processing/algs/qgis/CreateConstantRaster.py +++ b/python/plugins/processing/algs/qgis/CreateConstantRaster.py @@ -84,8 +84,8 @@ class CreateConstantRaster(QgisAlgorithm): outputFile = self.parameterAsOutputLayer(parameters, self.OUTPUT, context) outputFormat = QgsRasterFileWriter.driverForExtension(os.path.splitext(outputFile)[1]) - rows = max([math.ceil(extent.height() / pixelSize), 1.0]) - cols = max([math.ceil(extent.width() / pixelSize), 1.0]) + rows = int(max([math.ceil(extent.height() / pixelSize), 1.0])) + cols = int(max([math.ceil(extent.width() / pixelSize), 1.0])) writer = QgsRasterFileWriter(outputFile) writer.setOutputProviderKey('gdal')