diff --git a/gramps/plugins/gramplet/gramplet.gpr.py b/gramps/plugins/gramplet/gramplet.gpr.py index ca0425446..31ced722a 100644 --- a/gramps/plugins/gramplet/gramplet.gpr.py +++ b/gramps/plugins/gramplet/gramplet.gpr.py @@ -422,9 +422,13 @@ else: message = _("Image metadata functionality will not be available.\n" "To build it for Gramps see " "%(gramps_wiki_build_gexiv2_url)s" % gexiv2_dict ) - MessageHideDialog(title, message, - 'interface.ignore-gexiv2', - parent=uistate.window) + if uistate: + MessageHideDialog(title, message, + 'interface.ignore-gexiv2', + parent=uistate.window) + else: + MessageHideDialog(title, message, + 'interface.ignore-gexiv2') register(GRAMPLET, id="Person Residence", diff --git a/gramps/plugins/view/geography.gpr.py b/gramps/plugins/view/geography.gpr.py index ac6c18b07..3d910c441 100644 --- a/gramps/plugins/view/geography.gpr.py +++ b/gramps/plugins/view/geography.gpr.py @@ -72,9 +72,13 @@ if not OSMGPSMAP: MESSAGE = _("Geography functionality will not be available.\n" "To build it for Gramps see " "%(gramps_wiki_build_osmgps_url)s") % OSMGPS_DICT - MessageHideDialog(TITLE, MESSAGE, - 'interface.ignore-osmgpsmap', - parent=uistate.window) + if uistate: + MessageHideDialog(TITLE, MESSAGE, + 'interface.ignore-osmgpsmap', + parent=uistate.window) + else: + MessageHideDialog(TITLE, MESSAGE, + 'interface.ignore-osmgpsmap') else: # Load the view only if osmgpsmap library is present. register(VIEW,