On 12-02-14 19:23, Ed Boesenberg wrote: > Hello Everyone, > > I am trying to fix my plugin to work with Qgis 2.0 but I am running into > a snag because I struggle with Python and OOP. When I run my code I get > an error, AttributeError: 'QgsVectorDataProvider' object has no > attribute 'featureAtId', for this line of code: > > provider.featureAtId(selection_list[0], feat). > > I have reviewed http://www.qgis.org/api/classQgsVectorDataProvider.html > and http://www.qgis.org/en/docs/pyqgis_developer_cookbook/vector.html > > How should the above code be modified?
Hi Ed, plz have a look at: http://hub.qgis.org/wiki/17/Python_plugin_API_changes_from_18_to_20#Vector-layer-API-changes Or more general: http://hub.qgis.org/wiki/17/Python_plugin_API_changes_from_18_to_20 and http://hub.qgis.org/wiki/quantum-gis/Plugin_Compatibility HTH, regards, Richard Duivenvoorde _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
