# Error using "Relationship path between \<persons\>"

**URL:** <https://gramps.discourse.group/t/error-using-relationship-path-between-persons/8177>\
**Category:** Help\
**Tags:** filters\
**Created:** [August 16, 2025, 6:15pm UTC](https://gramps.discourse.group/t/error-using-relationship-path-between-persons/8177 "2025-08-16T18:15:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [August 16, 2025, 6:15pm UTC](https://gramps.discourse.group/t/error-using-relationship-path-between-persons/8177/1 "2025-08-16T18:15:57Z")

</div>

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:

```python
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.

---

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [August 16, 2025, 7:44pm UTC](https://gramps.discourse.group/t/error-using-relationship-path-between-persons/8177/2 "2025-08-16T19:44:46Z")

</div>

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](https://gramps-project.org/bugs/view.php?id=13949)

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [August 16, 2025, 7:55pm UTC](https://gramps.discourse.group/t/error-using-relationship-path-between-persons/8177/3 "2025-08-16T19:55:45Z")

</div>

This was fixed in v6.0.4. See PR [#2085](https://github.com/gramps-project/gramps/pull/2085) “Fix regression in relationship path between people filter”.

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [August 17, 2025, 6:10am UTC](https://gramps.discourse.group/t/error-using-relationship-path-between-persons/8177/4 "2025-08-17T06:10:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [September 16, 2025, 6:11am UTC](https://gramps.discourse.group/t/error-using-relationship-path-between-persons/8177/5 "2025-09-16T06:11:13Z")

</div>

Closed on September 16, 2025, 6:11am UTC

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