[Qgis-developer] Problem loading Vector Layer

Jitendra kumar jitendra.harlalka at gmail.com
Tue Oct 19 10:45:26 EDT 2010


Hello all,
    I am new to Python binding for QGIS. I have been having problem in
getting a Vector Layer to be loaded. I typed the following on python
console:

>>> from qgis.core import *
>>> layer=QgsVectorLayer("/path/to/shape/file.shp","layer","ogr")
Failed to load

The output is "Failed to load" which isn't very helpful and doesn't specify
the cause. I am not sure what is the problem. I have confirmed that filepath
is correct and the shp file can be opened in QGIS. I would appreciate if
someone could help me solve the problem.

Regards,
Jitendra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20101019/ba94dc5a/attachment.html


More information about the Qgis-developer mailing list