[QGIS-trac] Re: [Quantum GIS] #2496: Error trying to make distance matrix for "ID fields" with non ascii characters

Quantum GIS qgis at qgis.org
Wed May 5 13:40:14 EDT 2010


#2496: Error trying to make distance matrix for "ID fields" with non ascii
characters
-----------------------------------------------------+----------------------
        Reporter:  gislab                            |         Owner:  cfarmer      
            Type:  bug                               |        Status:  reopened     
        Priority:  major: does not work as expected  |     Milestone:  Version 1.5.0
       Component:  Python plugins and bindings       |       Version:  HEAD         
      Resolution:                                    |      Keywords:               
Platform_version:                                    |      Platform:  All          
        Must_fix:  Yes                               |   Status_info:  0            
-----------------------------------------------------+----------------------
Changes (by alexbruy):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 Problem with non ASCII characters in fields values still exists. Tested
 under Linux with UTF-8 locale and QGIS 13404. Here is error log

 {{{
 Traceback (most recent call last):
   File "/usr/local/qgis-
 svn/share/qgis/python/plugins/fTools/tools/doPointDistance.py", line 143,
 in accept
     self.compute(point1, point2, field1, field2, outPath, matType,
 nearest, self.progressBar)
   File "/usr/local/qgis-
 svn/share/qgis/python/plugins/fTools/tools/doPointDistance.py", line 188,
 in compute
     self.linearMatrix(writer, provider1, provider2, index1, index2,
 nearest, distArea, matType, sindex, progressBar)
   File "/usr/local/qgis-
 svn/share/qgis/python/plugins/fTools/tools/doPointDistance.py", line 242,
 in linearMatrix
     if matType == "Linear": writer.writerow([unicode(inID),
 unicode(outID), float(dist)])
   File "/usr/local/qgis-
 svn/share/qgis/python/plugins/fTools/tools/doPointDistance.py", line 64,
 in writerow
     self.writer.writerow(row)
 UnicodeEncodeError: 'ascii' codec can't encode characters in position
 0-10: ordinal not in range(128)
 }}}

 Patch added

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/2496#comment:7>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list