2013/3/21 Rafael Varela Pet <[email protected]> wrote: > I'm experiencing problems running the following script in QGIS 1.8: > > > ---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- > > from qgis.core import * > from PyQt4.QtCore import * > > inFileName="/tmp/test.csv" > > url = QUrl.fromLocalFile( inFileName ) > > capaImportada = QgsVectorLayer( QString.fromAscii( url.toEncoded() ), > "testLayer", "delimitedtext" ) > > pr=capaImportada.dataProvider() > pr.featureCount() > > QgsMapLayerRegistry.instance().addMapLayers( [capaImportada] ) > > > ---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- > > > In QGIS 1.8, pr.featureCount() shows the correct number of features (7L) but > the > feature table always shows only the last record. The layer metadata also > seems correct. Tha same happens both in Windows or Debian.
Finally, although master does not seem to suffer this problem, I decided to file a ticket, just in case someone hits the same problem http://hub.qgis.org/issues/7493 Best regards, -- Rafael Varela _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
