[Qgis-developer] "Failed to load" while initializing vector layer

Martin Dobias wonder.sk at gmail.com
Wed Jul 6 06:58:32 EDT 2011


Hi Pankaj

On Wed, Jul 6, 2011 at 12:15 PM, Pankaj Singh
<singh.pankaj.iitkgp08 at gmail.com> wrote:
> Hello everyone,
> I am writing a PyQt Application which involves representing data on a GIS
> map. Behavior of map canvas will be same as I did in this web
> application(http://hcqm.alwaysdata.net/show-ratings/5/).
> But I'm facing problems in loading the shape file for the state as error
> occurs in line 132 of this code http://pastebin.com/3pKZpukV and following
> lines are printed
> Failed to load
> <qgis.core.QgsVectorLayer object at 0x2b21a70>

it seems that qgis initialization code is missing, see the cookbok how
to set path to qgis libraries and do the initialization:
file:///home/martin/qgis/doc-svn/developer_cookbook/build/html/intro.html#python-applications

Regards
Martin


More information about the Qgis-developer mailing list