linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

Plugin does not honour configuration prepared by DatabaseConfiguration.py #79

Closed strk closed 4 years ago

strk commented 4 years ago

Running the DatabaseConfiguration.py script as done by src/setenv.sh creates a file .config/Land Information New Zealand/Gazetteer Administration.conf containing variables passed on command line. In my case these variables are:

root@3f641891cbc8:~# cat .config/Land\ Information\ New\ Zealand/Gazetteer\ Administration.conf
[Database]
host=db
password=********
user=gaz_web
database=gazetteer

Despite this, when picking Plugins-Gazetteer_editor-About_Gazetteer_application menu item, all the values of those variables are reported as being empty/undefined.

strk commented 4 years ago

I know this would be backward incompatible but can I suggest to avoid spaces in filenames ? It would be much easier to have a ~/.config/LINZ/nzgbplugin.conf

strk commented 4 years ago

I found out in code that the empty strings are shown when there's no self._controller. And I verified this was the reason. When is the controller supposed to be populated ?

strk commented 4 years ago

Pull request #81 improves the About screen to show this occurrence (no connection). But I'd still like to know WHEN the connection is supposed to happen, and WHY it is not happening... Ideas @ccrook ?

strk commented 4 years ago

I confirm this was only a mis-reporting to the user, which would be fixed by merging #81. As per WHEN the connection happens, I could see it happens on starting the editor. And I verified that the About screen reflects that, when invoked again after starting the editor. (I still think the About screen could report the configuration, even when NOT connected, but that's for another issue)