Bug report #14086

gdal tools - proximity (non-ascii characters)

Added by ozan cicekci almost 7 years ago. Updated almost 7 years ago.

Category:GDAL Tools
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:22096


While using the proximity tool, If the path of the input or output files include any non-ascii characters, it raises encoding error exception. Although the solution is easy on the user side, projects using this tool becomes hard to maintain, & with a non English OS where most of the paths already include non-ascii characters.

Example input path with Japanese characters:

ERROR 4: `B:\\H27Ɩ\\F92015040_cshЍ\\z\\03W\\sakatanorth_georeferenced.tif' does not exist in the file system,
and is not recognised as a supported dataset name.

Traceback (most recent call last):
File "C:\\PROGRA~1\\QGISCH~1\\bin\\gdal_proximity.py", line 138, in
print('Unable to open %s' % src_filename)
UnicodeEncodeError: 'ascii' codec can't encode character u'\\u0196' in position 21: ordinal not in range(128)


#1 Updated by Alexander Bruy almost 7 years ago

  • Resolution set to up/downstream
  • Status changed from Open to Rejected

From error message I see that this happens in the gdal_proximity.py file which is part of the GDAL core. So ticket should be submitted to the GDAL bugtracker.

Also available in: Atom PDF