Bug report #18539

contour dialog box returns invalid path to GDAL command on windows

Added by Wouter Meinster over 3 years ago. Updated about 3 years ago.

Assignee:Victor Olaya
Affected QGIS version:3.0.0 Regression?:No
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26427


Using the Raster->Contour function in QGIS. I used the "save to file" option to select the output path and save the contours as a shp file. When I execute it gives the following log with an error:

Processing algorithm…
Input parameters: { 'INPUT' : '//server/Users/Shared/Survey/Projects/Tauw/DePoel/Data/edited data/blankedPoel.grd', 'BAND' : 1, 'INTERVAL' : 10, 'FIELD_NAME' : 'ELEV', 'CREATE_3D' : False, 'IGNORE_NODATA' : False, 'NODATA' : 0, 'OFFSET' : 0, 'OUTPUT' : 'C:/Users/data analist/Desktop/test.shp' }

GDAL command:
gdal_contour -b 1 -a ELEV -i 10.0 -f "ESRI Shapefile" "//server/Users/Shared/Survey/Projects/Tauw/DePoel/Data/edited data/blankedPoel.grd" "\"C:/Users/data analist/Desktop/test.shp\""
GDAL command output:
ERROR 1: Failed to create directory "C:/Users/data analist/Desktop/test.shp" for shapefile datastore.
Execution completed in 0.11 seconds
Results: {'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/data analist/Desktop/test.shp, 'createOptions': {'fileEncoding': 'System'}}>}

Might be that the mixed use of / and \ in the output path is the problem?


#1 Updated by Nyall Dawson about 3 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixed in 3.2

Also available in: Atom PDF