[Qgis-developer] Re: Fwd: [Qgis-user] QgsVectorLayer causes "Failed to load" error

Giuseppe Sucameli sucameli at faunalia.it
Wed Jul 6 08:15:36 EDT 2011


Hi all,

if I run the following code from a terminal:

brushtyler at Joe-Notebook:~$ python
>>> from qgis.core import *
>>> QgsApplication.setPrefixPath('/usr/local/qgis/', True)
>>> QgsApplication.initQgis()

I get

/home/brushtyler/projects/sources/qgis/src/core/qgsproviderregistry.cpp: 84:
(QgsProviderRegistry) Checking /usr/local/qgis//lib/qgis/plugins for
provider plugins
/home/brushtyler/projects/sources/qgis/src/core/qgsmessageoutput.cpp: 65:
(showMessage) No Data Providers:
/home/brushtyler/projects/sources/qgis/src/core/qgsmessageoutput.cpp: 69:
(showMessage) No QGIS data provider plugins found in:
/usr/local/qgis//lib/qgis/plugins
No vector layers can be loaded. Check your QGIS installation

As far as you can see, the QgsApplication searches providers in
/usr/local/qgis//lib/qgis/plugins
but in my local installation the qgis providers are in
/usr/local/lib/qgis/plugins

So just changing the code above to

>>> from qgis.core import *
>>> QgsApplication.setPrefixPath('/usr/local/', True)
>>> QgsApplication.initQgis()

and providers are loaded well  :)
I hope this helps.

Cheers.

On Wed, Jul 6, 2011 at 1:12 PM, leonidas <leonidas_liakos at yahoo.gr> wrote:

> I also have the same problem like Brian. Did anyone found the problem?
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Fwd-Qgis-user-QgsVectorLayer-causes-Failed-to-load-error-tp6482726p6553989.html
> Sent from the qgis-developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110706/a58d59b7/attachment.html


More information about the Qgis-developer mailing list