<div dir="ltr"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Hey,<br></blockquote><div><br></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">I get this debug message for a simple PyQGIS script:<br>../../src/core/qgscoordinatere<wbr>ferencesystem.cpp: 924: (getRecord) [6ms] user qgis.db not found<br>Not being familiar with the QGIS codebase it seems to me that there are two competing settings:<br>- qgisSettingsDirPath() gives me '/home/user/.local/share/profi<wbr>les/default'<br>- but <a href="https://qgis.org/api/qgsapplication_8cpp_source.html#l00127" target="_blank">https://qgis.org/api/qgsap<wbr>plication_8cpp_source.html#<wbr>l00127</a> checks for the environment variable (which is empty on my system) and falls back to which is accorrding to <a href="http://doc.qt.io/qt-5/qstandardpaths.html" target="_blank">http://doc.qt.io/qt-5/qstan<wbr>dardpaths.html</a> "~/.local/share<wbr>/<APPNAME>", "/usr/local/share/<APPNAME>", "/usr/share/<APPNAME>"<br>Indeed I have a qgis.db in  /home/user/.local/share/QGIS/Q<wbr>GIS3/profiles/default and if I create via the GUI "Settings > Profile > New profile" another one it shows up in /home/user/.local/share/QGI<wbr>S/QGIS3/profiles/ .<br>This is is clearly different from what qgisSettingsDirPath() returns.</blockquote><div><br></div><div>Yes this looks like a bug to me.  I will take a look.</div><div><br></div><div>Regards,</div><div>Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 2, 2017 at 9:06 PM, Christian Prior-Mamulyan <span dir="ltr"><<a href="mailto:cprior+qgis@gmail.com" target="_blank">cprior+qgis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Hello,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">first post of mine, am a software support engineer without much QGIS knowhow but "figure-it-out" drive. Here I have:</div><div style="font-size:12.8px"><br><div><br></div><div>1) some kind of a bug report</div><div>2) request for guidance</div><div><br></div><div><br></div><div>ad 1)</div><div><br></div><div>I have installed (and updated) the nightly build on a clean Ubuntu 16.04 (container with systemd-nspawn) with these apt sources:</div><div><div>$  cat /etc/apt/sources.list.d/qgis.l<wbr>ist</div><div>deb <a href="http://qgis.org/ubuntugis-nightly" target="_blank">http://qgis.org/ubuntugis-<wbr>nightly</a> xenial main</div><div>deb-src <a href="http://qgis.org/ubuntugis-nightly" target="_blank">http://qgis.org/<wbr>ubuntugis-nightly</a> xenial main</div><div>deb <a href="http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu" target="_blank">http://ppa.launchpad.net/u<wbr>buntugis/ubuntugis-unstable/ub<wbr>untu</a> xenial main<br></div></div><div><br></div><div><br></div><div>I get this debug message for a simple PyQGIS script:</div><div>../../src/core/qgscoordinatere<wbr>ferencesystem.cpp: 924: (getRecord) [6ms] user qgis.db not found</div><div><br></div><div>Not being familiar with the QGIS codebase it seems to me that there are two competing settings:</div><div><br></div><div>- qgisSettingsDirPath() gives me '/home/user/.local/share/profi<wbr>les/default'<br></div><div>- but <a href="https://qgis.org/api/qgsapplication_8cpp_source.html#l00127" target="_blank">https://qgis.org/api/qgsap<wbr>plication_8cpp_source.html#<wbr>l00127</a> checks for the environment variable (which is empty on my system) and falls back to which is accorrding to <a href="http://doc.qt.io/qt-5/qstandardpaths.html" target="_blank">http://doc.qt.io/qt-5/qstan<wbr>dardpaths.html</a> "~/.local/share<wbr>/<APPNAME>", "/usr/local/share/<APPNAME>", "/usr/share/<APPNAME>"</div><div><br></div><div>Indeed I have a qgis.db in  /home/user/.local/share/QGIS/Q<wbr>GIS3/profiles/default and if I create via the GUI "Settings > Profile > New profile" another one it shows up in /home/user/.local/share/QGI<wbr>S/QGIS3/profiles/ .</div><div><br></div><div>This is is clearly different from what qgisSettingsDirPath() returns.</div><div><br></div><div><br></div><div>PyQGIS code to reproduce the debug message "user qgis.db not found":</div><div>In [1]: from qgis.core import *<br></div><div><div>In [2]: crs = QgsCoordinateReferenceSystem()</div><div>In [3]: crs.createFromProj4("+proj=ort<wbr>ho +lat_0=20 +lon_0=20 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs")</div><div>../../src/core/qgscoordinatere<wbr>ferencesystem.cpp: 883: (getRecord) [0ms] failed : /resources/srs.db does not exist!</div><div>../../src/core/qgscoordinatere<wbr>ferencesystem.cpp: 883: (getRecord) [0ms] failed : /resources/srs.db does not exist!</div><div>Out[3]: True</div></div><div><br></div><div><br></div><div><br></div><div>ad 2)</div><div>Not sure if the above warrants a bug report, or if it is a package problem of the xenial ubuntugis-nightly packages. So:</div><div><br></div><div>I am looking for guidance in my quest to contribute to the PyQGIS docs.</div><div>Being new to QGIS (I need maps for a mobile app of mine) I would appreciate if someone experienced could guide me.</div><div><br></div><div>Right now I am</div><div>a) learning PyQGIS</div><div>b) documenting working examples as Python unittest modules in <a href="https://github.com/cprior/sunlightmap/tree/master/application/physical/GIS/qgis3-tests" target="_blank">https://github.com/cprior/s<wbr>unlightmap/tree/master/applica<wbr>tion/physical/GIS/qgis3-tests</a></div><div>(whole repo under MIT, so no effort would be "lost")</div><div><br></div><div>Started to poke around on <a href="https://gis.stackexchange.com/users/87254/cprior" target="_blank">https://gis.stackexchange.c<wbr>om/users/87254/cprior</a> but I would be glad to have a speedier onboarding process than looking at "badges earned"... ;)</div><div><br></div><div>I am willing to spend an hour each weekday for 4-6 weeks and think I could contribute something helpful to the PyQGIS docs.</div><div><br></div><div><br></div><div>BR,</div><div>Christian Prior-Mamulyan</div></div></div>
<br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br></div>