[Qgis-developer] Can not load shape files with QgsVectorLAyer function

luca_manganelli at comune.trento.it luca_manganelli at comune.trento.it
Wed Oct 21 04:18:07 EDT 2009



qgis-developer-bounces at lists.osgeo.org scritti il 21/10/2009 10.13.51

> Hello,
>
> vlayer = QgsVectorLayer("C:
>
\Users\lutfi\Documents\tezzzz\shapefiles\data\SGID93_BOUNDARIES_Municipalities.

> shp", "hebe", "ogr")
>
> I am trying to run the code above and no matter what is the file,
> featurecount always return zero in python console so that ny plugin
> does not work. What may be the problem?

see the slash "\", it does an escape.

Try it with double shlashes ("\\") or inverted slash ("/").

It's a common error (I've made many mistakes with it :-) )



More information about the Qgis-developer mailing list