Hello,

I know this problem has been discussed many times, but the usual
remedies are not working.

First I run the following commands from the shell:

export LD_LIBRARY_PATH=/usr/local/qgis/lib
export PYTHONPATH=/usr/local/qgis/share/qgis/python


Then I run the following program:

from qgis.core import *

qgis_prefix = '/usr/local/qgis/'

QgsApplication.setPrefixPath('/usr/local/qgis/', True)
QgsApplication.initQgis()

vlayer=QgsVectorLayer('./tl_2009_09001_faces.shp','tl_2009_09001_faces','ogr')
print vlayer.isValid()


I get the error message "Failed to load".

I am using the 1.18 debian packages.  It works fine if I run these
commands from the python console in qgis.  Any suggestions?  Thanks.
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to