1

I have problem with python in QGIS. A module I have installed (AROSICS if it matters) uses a gdal_array.OpenNumPyArray function. It however crashes my QGIS when I try to run a script including functions from AROSICS. I have tracked down the error to the function and below is the (not)working example, which crashes QGIS when run from python console:

import numpy as np
from osgeo import gdal_array

array = np.array([[1,2,3],[4,5,6],[7,8,9]]) # a test array
ds = gdal_array.OpenNumPyArray(array) # command, which crashes QGIS

I'm using Windows 8.1 on Lenovo Y580 and QGIS 2.18.11 installed, alongside everything else (python, gdal, bindings...) with the newest version of OSGEO4W installer. The problem persists after a reinstall of QGIS and on a completely different machine running Windows 10, so I assume it's something within GDAL. From a research on the net I got to know, that I should have a _gdal_array.pyd file somewhere in the installation and I do, however a _gdal_array.dll is missing. Is it important? What should I do to fix the problem?

  • 1
    I have same your problem, Did you install latest version of gdal? – nickan Sep 11 '17 at 12:20
  • Honestly I, gave up and installed Ubuntu on a second partition for the sole task of running AROSICS. It works there. – Julian_P Sep 13 '17 at 18:42

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.