Skip to content

Commit 1c27ee3

Browse files
committed
[processing] handle same memory error in another algorithm
1 parent d3b4a8f commit 1c27ee3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/plugins/processing/script/scripts/Extract_raster_values_to_CSV.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@
6565
progress.setPercentage(int(current * total))
6666

6767
rasterBand = raster.GetRasterBand(i + 1)
68-
data = rasterBand.ReadAsArray()
68+
try:
69+
data = rasterBand.ReadAsArray()
70+
except:
71+
raise GeoAlgorithmExecutionException(
72+
'Error reading raster data. File might be too big.')
6973
layer.ResetReading()
7074
feature = layer.GetNextFeature()
7175
col = []

0 commit comments

Comments
 (0)