1

Running the Polygonize tool in QGIS keeps generating the following error:

Processing algorithm…
Algorithm 'Polygonize (raster to vector)' starting…
Input parameters:
{ 'BAND' : 1, 'EIGHT_CONNECTEDNESS' : False, 'FIELD' : 'DN', 'INPUT' : 'C:/Users/Erik/Desktop/AgriSA/AgriSAshape.tif', 'OUTPUT' : 'C:/Users/Erik/Desktop/AgriSA/AgriSApol.gpkg' }

GDAL command:
python3 -m gdal_polygonize C:/Users/Erik/Desktop/AgriSA/AgriSAshape.tif C:/Users/Erik/Desktop/AgriSA/AgriSApol.gpkg -b 1 -f "GPKG" AgriSApol DN
GDAL command output:
Traceback (most recent call last):

File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\runpy.py", line 193, in _run_module_as_main

"__main__", mod_spec)

File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\runpy.py", line 85, in _run_code

exec(code, run_globals)

File "C:\PROGRA~1\QGIS3~1.4\bin\gdal_polygonize.py", line 36, in <module>

from osgeo import gdal

File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\osgeo\__init__.py", line 21, in <module>

_gdal = swig_import_helper()

File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\osgeo\__init__.py", line 17, in swig_import_helper

_mod = imp.load_module('_gdal', fp, pathname, description)

File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\imp.py", line 243, in load_module

return load_dynamic(name, filename, file)

File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\imp.py", line 343, in load_dynamic

return _load(spec)

ImportError: DLL load failed: Kan opgegeven procedure niet vinden.

Execution completed in 0.56 seconds
Results:
{'OUTPUT': 'C:/Users/Erik/Desktop/AgriSA/AgriSApol.gpkg'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>C:/Users/Erik/Desktop/AgriSA/AgriSApol.gpkg</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

log:

2019-07-16T09:28:32     INFO    python3 -m gdal_polygonize C:/Users/Erik/Desktop/AgriSA/subsistenceSAclip.tif C:/Users/Erik/AppData/Local/Temp/processing_65c11c5862ef4f1c88e5495ff73aeeba/2e6619d834b246e1a07916ba724274ad/OUTPUT.shp -b 1 -f "ESRI Shapefile" OUTPUT DN
2019-07-16T09:28:32     INFO    GDAL execution console output
             Traceback (most recent call last):

              File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\runpy.py", line 193, in _run_module_as_main

              "__main__", mod_spec)

              File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\runpy.py", line 85, in _run_code

              exec(code, run_globals)

              File "C:\PROGRA~1\QGIS3~1.4\bin\gdal_polygonize.py", line 36, in 

              from osgeo import gdal

              File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\osgeo\__init__.py", line 21, in 

              _gdal = swig_import_helper()

              File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\osgeo\__init__.py", line 17, in swig_import_helper

              _mod = imp.load_module('_gdal', fp, pathname, description)

              File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\imp.py", line 243, in load_module

              return load_dynamic(name, filename, file)

              File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\imp.py", line 343, in load_dynamic

              return _load(spec)

             ImportError: DLL load failed: Kan opgegeven procedure niet vinden. [Cannot find requested procedure]

I have tried different versions of QGIS (2.x and 3.4) and different clips of the raster. Does anyone know where it could come from?

  • "You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm." – csk Jul 15 at 15:24
  • I added the log to the question now but I'm still clueless – Erik Jul 16 at 7:31

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.