Bug report #16250

Processing ogr tools problems in QGIS 2.18.10 when special chars are in input file names

Added by Giovanni Manghi over 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:Luigi Pirelli
Category:Processing/OGR
Affected QGIS version:2.18.10 Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24160

Description

Example with the dissolve alg:

Output command when input is in a path with no special chars:

Algorithm Dissolve polygons starting...
GDAL command:
cmd.exe /C ogr2ogr.exe "C:\\Users\\qgis\\AppData\\Local\\Temp\\processinga60439eecfc34e4690647a61c6b280b3\\1ef2514e11f94587acf8ff50ed8cc2aa\\OUTPUTLAYER.shp" C:/Users/qgis/Desktop/lixo/conc.shp conc -dialect sqlite -sql "SELECT ST_Union(geometry),concelho FROM 'conc' GROUP BY concelho"
GDAL command output:
Warning 1: layer names ignored in combination with -sql.
Converting outputs
Loading resulting layers
Algorithm Dissolve polygons finished

Output command when input is in a path with special chars:

Algorithm Dissolve polygons starting...
GDAL command:
cmd.exe /C ogr2ogr.exe "C:\\Users\\qgis\\AppData\\Local\\Temp\\processinga60439eecfc34e4690647a61c6b280b3\\d4d98511093d41cd94001dbdbe389933\\OUTPUTLAYER.shp" C:\\Users\\qgis\\AppData\\Local\\Temp\\processinga60439eecfc34e4690647a61c6b280b3\\1488318011.8921.shp 1488318011.8921 -dialect sqlite -sql "SELECT ST_Union(geometry),concelho FROM '1488318011.8921' GROUP BY 1488318011.8921elho"
GDAL command output:
Warning 1: layer names ignored in combination with -sql.
ERROR 1: In ExecuteSQL(): sqlite3_prepare(SELECT ST_Union(geometry),concelho FROM '1488318011.8921' GROUP BY 1488318011.8921elho):
unrecognized token: "1488318011.8921elho"
Converting outputs
Loading resulting layers

The following layers were not correctly generated.
Dissolved


Related issues

Related to QGIS Application - Bug report #9425: grass_script.bat always fails if USERNAME contains MBCS Closed 2014-01-25
Related to QGIS Application - Bug report #12657: Processing/GRASS don't work under Windows if username or ... Closed 2015-04-27
Duplicates QGIS Application - Bug report #13120: Processing gdal tools do not work if Windows username con... Closed 2015-07-15

History

#1 Updated by Giovanni Manghi over 2 years ago

Other algs are possibly affected.

#2 Updated by Alexander Bruy over 2 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Duplicates #13120

#3 Updated by Giovanni Manghi over 2 years ago

  • Resolution deleted (duplicate)
  • Affected QGIS version changed from 2.18.4 to 2.18.7
  • Priority changed from Severe/Regression to Normal
  • Status changed from Closed to Open
  • Description updated (diff)
  • Subject changed from Processing ogr tools problems when special chars are in input/output paths to Processing ogr tools problems in QGIS 2.18.7 when special chars are in input file names

Alexander Bruy wrote:

Duplicates #13120

Hi Alexander, the issue was not the same. Anyway I see that now in 2.18.7 the path to an input has a special char it works as expected, on the other hand if the input file name has a special char it fails

'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128) See log for more details

In the same case master works as expected, so better to fix also 2.18 as is the next LTR.

#4 Updated by Giovanni Manghi about 2 years ago

  • Affected QGIS version changed from 2.18.7 to 2.18.10
  • Subject changed from Processing ogr tools problems in QGIS 2.18.7 when special chars are in input file names to Processing ogr tools problems in QGIS 2.18.10 when special chars are in input file names

#5 Updated by Giovanni Manghi about 2 years ago

  • Status changed from Open to In Progress
  • Assignee changed from Giovanni Manghi to Luigi Pirelli

#6 Updated by Luigi Pirelli about 2 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Easy fix? changed from No to Yes

#7 Updated by Luigi Pirelli about 2 years ago

also a new PR by @alexbruy is present
https://github.com/qgis/QGIS/pull/4931

#8 Updated by Nyall Dawson over 1 year ago

  • Resolution set to fixed/implemented
  • Status changed from In Progress to Closed

Should be fixed in 3.2

Also available in: Atom PDF