[QGIS-Developer] Docs Travis, Failed to open /usr/share/qgis/resources/data/world_map.gpkg: Permission denied.
Richard Duivenvoorde
rdmailings at duif.net
Tue Oct 27 12:22:54 PDT 2020
Hi Devs,
A build of a Docs PR of my [0] in which I try to open the world_map.gpkg is failing because:
Warning 4: Failed to open /usr/share/qgis/resources/data/world_map.gpkg: Permission denied.
In my local builds
iface.addVectorLayer(os.path.join(QgsApplication.pkgDataPath(),'resources','data','world_map.gpkg|layername=Countries'), '', 'ogr')
just works.
But in Travis (and a global install) apparently the resources are not readable by a normal user.
What could be the best solution for that:
- add an install step which makes such resources available for users (and their plugins?)
- create code so the inbuilt: uri's would work (see [1])
iface.addVectorLayer('inbuilt:/data/world_map.gpkg|layername=countries', 'Countries', 'ogr')
Any input appreciated, Thanks,
Richard
[0] https://github.com/qgis/QGIS-Documentation/pull/5521
[1] https://github.com/qgis/QGIS/pull/39175
More information about the QGIS-Developer
mailing list