From 28dc2e5158d4469e115c20d47cc7c05964448bba Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Sat, 4 Apr 2020 09:49:41 +0200 Subject: [PATCH] Geography: add a popup for a bad tiles path (#1025) --- gramps/plugins/lib/maps/osmgps.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/lib/maps/osmgps.py b/gramps/plugins/lib/maps/osmgps.py index 5d3c19f2a..791182cc3 100644 --- a/gramps/plugins/lib/maps/osmgps.py +++ b/gramps/plugins/lib/maps/osmgps.py @@ -64,6 +64,7 @@ _ = glocale.translation.sgettext from gramps.gen.config import config from gramps.gui.dialog import ErrorDialog from gramps.gen.constfunc import get_env_var +from gramps.gen.const import VERSION_DIR #------------------------------------------------------------------------- # @@ -138,7 +139,19 @@ class OsmGps: ErrorDialog(_("Can't create " "tiles cache directory %s") % cache_path, parent=self.uistate.window) - return self.vbox + gini = os.path.join(VERSION_DIR, 'gramps.ini') + ErrorDialog(_("You must verify and change the tiles cache" + "\n..." + "\n[geography]" + "\n..." + "\npath='bad/path'" + "\n..." + "\nin the gramps.ini file :\n%s" + "\n\nBefore to change the gramps.ini file, " + "you need to close gramps" + "\n\nThe next errors will be normal") % gini, + parent=self.uistate.window) + return None self.change_map(None, config.get("geography.map_service")) return self.vbox