Bug report #2566

Split vector layer doesn't work with the fields containing Cyrillics

Added by dr - over 14 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:cfarmer -
Category:Python plugins
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12626

Description

Subj. Example of layer in attachment. Choose 'NAME' field and get an error:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:\\OSGeo4W\\apps\\qgis-dev\\python\\plugins\\fTools\\tools\\doVectorSplit.py", line 76, in accept
    self.split(inLayer, unicode(outPath), unicode(inField), self.progressBar)
  File "C:\\OSGeo4W\\apps\\qgis-dev\\python\\plugins\\fTools\\tools\\doVectorSplit.py", line 165, in split
    writer = [[QgsVectorFileWriter]](baseName + "_" + unicode(i.toString().trimmed()) + ".shp", self.encoding, fieldList, vlayer.dataProvider().geometryType(), sRs)
[[TypeError]]: unsupported operand type(s) for +: 'QString' and 'unicode'

Python version:
2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]

ecoregions.7z (39.4 KB) dr -, 2010-03-20 05:23 AM

fix_2566.diff Magnifier (735 Bytes) Alexander Bruy, 2010-05-05 10:32 AM

Associated revisions

Revision dc8874ed
Added by cfarmer - over 14 years ago

now supports fields containing Cyrillics. Fixes #2566. Patch from alexbruy

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13477 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision b168560b
Added by cfarmer - over 14 years ago

now supports fields containing Cyrillics. Fixes #2566. Patch from alexbruy

git-svn-id: http://svn.osgeo.org/qgis/trunk@13477 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Alexander Bruy over 14 years ago

Patch to fix this issue

#2 Updated by cfarmer - over 14 years ago

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

Patch applied in b168560b (SVN r13478).

Carson

Also available in: Atom PDF