Importing a place with GetGOV fails


I’m new to Gramps and just starting a family tree (on Windows 10, current Gramps version 5.1.3). I thought about how to record place names and found the GetGOV gramplet. It looks nice and I imported a couple of places just fine. Then I had one place (REIAELJO30KJ) where just the place was imported, but no hierarchy. The GOV website shows the hierarchy just fine. When I tried to import the parent place for the church (REIEID_W5489), nothing happens. Nothing is imported, but there isn’t any kind of error either.

Is there a way to get more information about what the gramplet does, a log file or debug output? And is this kind of behaviour normal for the GetGOV gramplet? I’d like to get this sorted before I try to record many place names using this system. Thanks for any insight on this issue.



I tried the import on a new database.

The church Reifferscheid (St. Michael) (REIAELJO30KJ) imported with no hierarchy.

I deleted the record in Gramps and I imported the Dorf Reifferscheid (REIEID_W5489). I imported the Parish Reifferscheid (St. Michael) (object_1271356) both with no problems each with their own hierarchy. I imported the church Reifferscheid (St. Michael) (REIAELJO30KJ) again and again, because there is no hieracrchy, it did not join up with either the Dorf or Parish.

What is supposed to happen is that both the civil and religious hierarchies for the church should have download when you fed the church’s location’s code into the app. Because the same upper hierarchies will import for multiple locations, these places should merge with the records with the same codes you previously imported. This is the first time I have seen this problem although I am not a big user of the app.

This what imported for the dorf

and the parish

Obviously something is wrong with the actual church’s record. Please double check that dorf is missing after attempting to import. As I said (and show) it worked for me. If nothing else, you can add the church and civil hierarchies to the church record the old fashion way. You can drag-n-drop the dorf’s and parish’s record into the church’s Enclosed by tab.

I will file a ticket on this. The GetGOV gramplet extracts the Belongs To relationship to build the place hierarchy. It should also extract the Located In relationship, which in the GOV system is unique to buildings (which dont change location with time) within settlements.

If you want an immediate fix and are comfortable in coding, update (add 3 lines) GetGOV/ around line 430:

    for element in top[0].getElementsByTagName('gov:isPartOf'):
        ref, date = self.__get_ispartof(element)
        ref_list.append((ref, date))


    for element in top[0].getElementsByTagName('gov:isPartOf'):
        ref, date = self.__get_ispartof(element)
        ref_list.append((ref, date))
    for element in top[0].getElementsByTagName('gov:isLocatedIn'):
        ref, date = self.__get_ispartof(element)
        ref_list.append((ref, date))

Thanks for the fast replies! I thought about this a bit more and think the problem is with the village record (REIEID_W5489), as this is the one that will not import at all for me. I just tried it in a brand new family tree with no data. This time it actually took some time and then I got an error message:

232840: ERROR: line 157: Unhandled exception
Traceback (most recent call last):
  File "C:\Users\Johannes\AppData\Roaming\gramps\gramps51\plugins\GetGOV\", line 351, in __get_places
  File "C:\Users\Johannes\AppData\Roaming\gramps\gramps51\plugins\GetGOV\", line 397, in __get_place
    response = urlopen(gov_url)
  File "AIO/urllib/", line 223, in urlopen
  File "AIO/urllib/", line 532, in open
  File "AIO/urllib/", line 642, in http_response
  File "AIO/urllib/", line 570, in error
  File "AIO/urllib/", line 504, in _call_chain
  File "AIO/urllib/", line 650, in http_error_default
urllib.error.HTTPError: HTTP Error 500: Internal Server Error

I restarted Gramps and tried all the parent places:

  • object_353729: Adenau MairieBürgermeisterei
  • object_152625: Adenau Verbandsgemeinde
  • adm_137131: Landkreis Ahrweiler
  • object_279959: Landkreis Hocheifelkreis

As far as I can tell all places and hierarchies have been imported correctly. Then I tried Reifferscheid again. It didn’t show up in the tree view, but I searched for it and found it!

I think I understand now what has me so confused: Gramps sorts a place in the tree view under the first parent and it does sort them chronologically. So because this part of Germany has been a part of France and that is the first entry, all the stuff I was trying to import was sorted under “France” in the tree. That was a bit unexpected. :slight_smile: Is there a simple way to change this without resorting the parents of all the places?

Also, I tried your modification of GetGOV. The chruch imported with the correct relationship to the village, but without the parish. The parish is not imported at all. Was that intended?

1 Like

I am aware of several of the issues raised here, and have fixed them in the hopefully upcoming place enhancements GEPS 045 and its associated addons change
These will eventually include

  • places tree view based on current date
  • A better error handling for internet errors
  • Importing other (non-place hierarchies, like religious) which is why I suspect the “parish” is not importing

The “isLocatedIn” bit will need to be modified in the GEPS 045 work, as that is a new bug.


I really look forward to trying out your enhancements. But worry that I might have to sacrifice some of my idiosyncratic Place adaptations for the convenience of harmonization.

The common issue where the same name is used for several hierarchical breadcrumbs of enclosing places has lead me to use disambiguating terms in my preferred place name.

e.g., given New York, NY. Is that New York City or New York county?

I’ve taken to appending ‘county’ (lower case) to my US counties. It isn’t part of the official Proper Name but my narrative reports are not ambiguous… neither is the Place Selector that only shows the final breadcrumb.

Similarly, my plethora of 'Washington county’s include a disambiguating State abbreviation. e.g., “Washington (PA) county”. Unfortunately, while that helps for Place selection, it is unsatisfactory for reports.

So I’m hoping the new Place feature will not overwrite my nicknames during harmonization. And that it lets me use disambiguating nicknames for the GUI & official names (with selected place types) for reports.

But I don’t see how such a balance would even be possible.

getGOV only imports SuperOrdinate (enclosing) objects, not SubOrdinate (enclosed) objects. In this case, STMEIDJO30FL is SubOrdinate and it has a SuperOrdinate of object_1161715 (the only parish I found). Neither of these objects would be included if you chose a gov ID of REIEIDJO30FL.

PR submitted to fix the isLocatedIn issue: