Bug report #20895

Updated by Jürgen Fischer about 1 year ago

After loading two geotiff DEMs into separate layers, then attempting a Raster --> Miscellaneous --> Merge... of the two layers, it takes only a few seconds to fail, resulting in a new layer of the correct size, but with no elevation data. Near the beginning of the log it says "RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa" and near the end it says "No module named _gdal_array". This worked fine in the previous version of QGIS I had and is a critical part of my work.

I thought maybe I needed to delete my older version of QGIS, so ultimately I deleted all QGIS files I could find throughout my system and then reinstalled, but that didn't help.

Here is the entire log:

<pre>
Processing algorithm…
Algorithm 'Merge' starting…
Input parameters:
{ 'DATA_TYPE' : 5, 'INPUT' : ['D:/SteamLibrary/steamapps/common/assettocorsa/content/tracks/tuttleridge/resources/LIDAR/Monroe/monroe','D:/SteamLibrary/steamapps/common/assettocorsa/content/tracks/tuttleridge/resources/LIDAR/Vernon/vernon'], 'NODATA_INPUT' : None, 'NODATA_OUTPUT' : None, 'OPTIONS' : '', 'OUTPUT' : 'C:/Users/corey/AppData/Local/Temp/processing_6399c68c009946eeb88963854255a4cd/1feb7c0f4e8542e8a6583730da4eebcb/OUTPUT.tif', 'PCT' : False, 'SEPARATE' : False }

GDAL command:
cmd.exe /C gdal_merge.bat -ot Float32 -of GTiff -o C:/Users/corey/AppData/Local/Temp/processing_6399c68c009946eeb88963854255a4cd/1feb7c0f4e8542e8a6583730da4eebcb/OUTPUT.tif --optfile C:/Users/corey/AppData/Local/Temp/processing_6399c68c009946eeb88963854255a4cd\mergeInputFiles.txt
GDAL command output:
0RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa

Traceback (most recent call last):

File "C:\QGIS\bin\gdal_merge.py", line 611, in <module>

sys.exit(main())

File "C:\QGIS\bin\gdal_merge.py", line 596, in main

fi.copy_into(t_fh, band, band, nodata)

File "C:\QGIS\bin\gdal_merge.py", line 343, in copy_into

nodata_arg)

File "C:\QGIS\bin\gdal_merge.py", line 124, in raster_copy

m_band)

File "C:\QGIS\bin\gdal_merge.py", line 180, in raster_copy_with_mask

t_xsize, t_ysize)

File "C:\QGIS\apps\Python27\lib\site-packages\osgeo\gdal.py", line 2635, in ReadAsArray

from osgeo import gdalnumeric

File "C:\QGIS\apps\Python27\lib\site-packages\osgeo\gdalnumeric.py", line 2, in <module>

from osgeo.gdal_array import *

File "C:\QGIS\apps\Python27\lib\site-packages\osgeo\gdal_array.py", line 17, in <module>

_gdal_array = swig_import_helper()

File "C:\QGIS\apps\Python27\lib\site-packages\osgeo\gdal_array.py", line 16, in swig_import_helper

return importlib.import_module('_gdal_array')

File "C:\QGIS\apps\Python27\lib\importlib\__init__.py", line 37, in import_module

__import__(name)

ImportError: No module named _gdal_array

Execution completed in 2.28 seconds
Results:
{'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/corey/AppData/Local/Temp/processing_6399c68c009946eeb88963854255a4cd/1feb7c0f4e8542e8a6583730da4eebcb/OUTPUT.tif, 'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers
Algorithm 'Merge' finished
</pre>

Back