Error using "Relationship path between <persons>"

Gramps 6.0.3 on MacOS

I’m trying to use the built-in filter “Relationship path between ”.
In the filter editor I add the “Relationship path between ” and add two person ids using the [Select] bottons.
When I test the filter, I get the following error:

129366391: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/site-packages/gramps/gui/editors/filtereditor.py", line 1315, in test_clicked
    handle_list = filt.apply(self.db, self.get_all_handles())
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/site-packages/gramps/gen/filters/_genericfilter.py", line 275, in apply
    rule.requestprepare(db, user)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/site-packages/gramps/gen/filters/rules/_rule.py", line 108, in requestprepare
    self.prepare(db, user)
    ~~~~~~~~~~~~^^^^^^^^^^
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/site-packages/gramps/gen/filters/rules/person/_relationshippathbetween.py", line 73, in prepare
    self.init_list(root1.handle, root2.handle)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/site-packages/gramps/gen/filters/rules/person/_relationshippathbetween.py", line 130, in init_list
    new_rank = firstMap[person_handle]
               ~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'f8ec44af00018c264f8d966e8d3'

Wonder what I’m doing wrong?
Running simple filters like “People without a known birth date” works fine.

Looks like this broke recently as it worked on 5.1.6 . I can file a bug if you dont want to. To fix, edit:

/Applications/Gramps.app/Contents/Resources/lib/python3.13/site-packages/gramps/gen/filters/rules/person/_relationshippathbetween.py

change line 129 (and –> &) from

for person_handle in firstList and secondList:

to

for person_handle in firstList & secondList:

ADDED: bug filed: https://gramps-project.org/bugs/view.php?id=13949

1 Like

This was fixed in v6.0.4. See PR #2085 “Fix regression in relationship path between people filter”.

1 Like

Installed version 6.0.4 and can confirm, that Relationship Path Between works fine.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.