[Qgis-user] PyQGIS - problem opening shapefile
Martin Dobias
wonder.sk at gmail.com
Mon Jan 26 11:42:33 PST 2009
On Mon, Jan 26, 2009 at 8:06 PM, Tomasz Suchan <tomasz.suchan at gmail.com> wrote:
> Hi all,
> I'm trying to experiment with PyQGIS but I'm experiencing some problems...
> When adding shapefile I get:
>
>>>> from qgis.core import *
>>>> QgsApplication.setPrefixPath("/usr/share/qgis", True)
Hi Tomasz,
the prefix is incorrect. The path should be:
/usr - in case you're using distribution packages
/usr/local - in case you're using self-compiled installation with
default settings
If you've compiled QGIS with some non-default directory (e.g.
/home/username/qgis) then use that path.
The path is needed to determine where to search for provider modules
and more stuff, so if it's not correct, providers won't be loaded.
Regards
Martin
More information about the Qgis-user
mailing list