[QGIS-Developer] QGIS 2.99 nightly: profiles folder location
Christian Prior-Mamulyan
cprior+qgis at gmail.com
Sat Dec 2 03:06:52 PST 2017
Hello,
first post of mine, am a software support engineer without much QGIS
knowhow but "figure-it-out" drive. Here I have:
1) some kind of a bug report
2) request for guidance
ad 1)
I have installed (and updated) the nightly build on a clean Ubuntu 16.04
(container with systemd-nspawn) with these apt sources:
$ cat /etc/apt/sources.list.d/qgis.list
deb http://qgis.org/ubuntugis-nightly xenial main
deb-src http://qgis.org/ubuntugis-nightly xenial main
deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main
I get this debug message for a simple PyQGIS script:
../../src/core/qgscoordinatereferencesystem.cpp: 924: (getRecord) [6ms]
user qgis.db not found
Not being familiar with the QGIS codebase it seems to me that there are two
competing settings:
- qgisSettingsDirPath() gives me '/home/user/.local/share/profiles/default'
- but https://qgis.org/api/qgsapplication_8cpp_source.html#l00127 checks
for the environment variable (which is empty on my system) and falls back
to which is accorrding to http://doc.qt.io/qt-5/qstandardpaths.html
"~/.local/share/<APPNAME>", "/usr/local/share/<APPNAME>",
"/usr/share/<APPNAME>"
Indeed I have a qgis.db in /home/user/.local/share/QGIS/QGIS3/profiles/default
and if I create via the GUI "Settings > Profile > New profile" another one
it shows up in /home/user/.local/share/QGIS/QGIS3/profiles/ .
This is is clearly different from what qgisSettingsDirPath() returns.
PyQGIS code to reproduce the debug message "user qgis.db not found":
In [1]: from qgis.core import *
In [2]: crs = QgsCoordinateReferenceSystem()
In [3]: crs.createFromProj4("+proj=ortho +lat_0=20 +lon_0=20 +x_0=0 +y_0=0
+a=6370997 +b=6370997 +units=m +no_defs")
../../src/core/qgscoordinatereferencesystem.cpp: 883: (getRecord) [0ms]
failed : /resources/srs.db does not exist!
../../src/core/qgscoordinatereferencesystem.cpp: 883: (getRecord) [0ms]
failed : /resources/srs.db does not exist!
Out[3]: True
ad 2)
Not sure if the above warrants a bug report, or if it is a package problem
of the xenial ubuntugis-nightly packages. So:
I am looking for guidance in my quest to contribute to the PyQGIS docs.
Being new to QGIS (I need maps for a mobile app of mine) I would appreciate
if someone experienced could guide me.
Right now I am
a) learning PyQGIS
b) documenting working examples as Python unittest modules in
https://github.com/cprior/sunlightmap/tree/master/application/physical/GIS/
qgis3-tests
(whole repo under MIT, so no effort would be "lost")
Started to poke around on https://gis.stackexchange.com/users/87254/cprior but
I would be glad to have a speedier onboarding process than looking at
"badges earned"... ;)
I am willing to spend an hour each weekday for 4-6 weeks and think I could
contribute something helpful to the PyQGIS docs.
BR,
Christian Prior-Mamulyan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171202/cdce42db/attachment.html>
More information about the QGIS-Developer
mailing list