[QGIS-trac] [Quantum GIS] #2378: addFeature() doesn't work in QGIS

Quantum GIS qgis at qgis.org
Tue Jan 19 06:02:17 EST 2010


#2378: addFeature() doesn't work in QGIS
------------------------------------------------+---------------------------
   Reporter:  trapanator                        |              Owner:  borysiasty   
       Type:  bug                               |             Status:  new          
   Priority:  major: does not work as expected  |          Milestone:  Version 1.5.0
  Component:  Python plugins and bindings       |            Version:  HEAD         
   Keywords:                                    |   Platform_version:               
   Platform:  Debian                            |           Must_fix:  Yes          
Status_info:  0                                 |  
------------------------------------------------+---------------------------
 Hi, I wrote a python plugin that does a:


 {{{
 feat = QgsFeature()
 [...]
 x = 0
 y = "hello"
 feat.addAttribute (x, QString(y))
 }}}

 In Windows it works well, but in Ubuntu Jaunty (and QGIS 1.4.0) it gives
 this error:

 {{{
 TypeError: argument 2 of QgsFeature.addAttribute() has an invalid type
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2378>
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