[Qgis-user] PyQGIS - problem opening shapefile

Tomasz Suchan tomasz.suchan at gmail.com
Mon Jan 26 11:06:45 PST 2009


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)
>>> QgsApplication.initQgis()
>>> vlayer = QgsVectorLayer("test.shp", "test", "ogr")
Failed to load

Any clues? I think that prefix path is right (Ubuntu 8.10), isn't it?
Thanks, Tom



More information about the Qgis-user mailing list