Can't get filter to work in 6.0

V6.0 on win10 (I hate upgrades)
On 5.2.4 I had a filter to find a marriage person event within 8 degrees of the home person. This worked however when saving new records it took 10 seconds to complete the task.

Now with 6.0.1 I can’t get it to work at all.
I have created in desperation two filters. One to find the marriage event and another to find all people within 8 degrees of the home person. Both work as expected as stand alone filters, however when I combine them together, they produce no results.

Any ideas?

Have you tried the Optimizer class patch by @kku ?

Just saw that. Will try it this afternoon.

1 Like

Tried adding the patch. No change. Nothing returned.

Here is my rule:

Well I have really broken Gramps now. Can’t run any rules based on the People View. They run against other parts.
I get the following error report

71595: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gui\filters\sidebar\_sidebarfilter.py", line 166, in clicked
    self.clicked_func()
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\plugins\gramplet\filter.py", line 78, in __filter_clicked
    self.gui.view.build_tree()
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gui\views\listview.py", line 364, in build_tree
    self.model.rebuild_data()
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gui\views\treemodels\treebasemodel.py", line 520, in rebuild_data
    self._build_data(self.current_filter, None, skip)
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gui\views\treemodels\treebasemodel.py", line 589, in _rebuild_filter
    self.__rebuild_filter(
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gui\views\treemodels\treebasemodel.py", line 620, in __rebuild_filter
    for handle in dfilter.apply(
                  ^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\_genericfilter.py", line 285, in apply
    res = self.apply_logical_op_to_all(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\_genericfilter.py", line 189, in apply_logical_op_to_all
    if apply_logical_op(db, obj, self.flist) != self.invert:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\_genericfilter.py", line 222, in and_test
    return all(rule.apply_to_one(db, data) for rule in flist)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\_genericfilter.py", line 222, in <genexpr>
    return all(rule.apply_to_one(db, data) for rule in flist)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\rules\_matchesfilterbase.py", line 103, in apply_to_one
    return filt.apply_to_one(db, obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\_genericfilter.py", line 244, in apply_to_one
    res = self.and_test(db, data, self.flist)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\_genericfilter.py", line 222, in and_test
    return all(rule.apply_to_one(db, data) for rule in flist)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.1\gramps\gen\filters\_genericfilter.py", line 222, in <genexpr>
    return all(rule.apply_to_one(db, data) for rule in flist)
               ^^^^^^^^^^^^^^^^^
AttributeError: 'IsActivePerson' object has no attribute 'apply_to_one'
1 Like

Further info.

  • checked DB - ok
  • the one rule that fails is that I have tested with:
    People with events with the
    Role=“Unknown”;Inverse=“0”

Fails on the examplegramps DB too

Gave up on 6.0.1 and went back to 5.2.3

@SteveY came up with a solution for my filter issues. It might work for you.

Just remember to revert any changes you made to _genericfilter.py in the last attempt at a fix.

Thanks, but I’ll wait until 6.0.2 comes out. I’ve waisted enough time and it doesn’t have anything I really need.

Unfortunately, this looks like a different problem.
I might be able to extract enough from the error message to reproduce the problem

The ‘IsActivePerson’ rule is part of the FilterRules addon. That addon has not yet been correctly updated to support the filter enhancements that were made in gramps 6.0.

I say correctly, because the gramps_target_version in the addon was bumped to 6.0 3 months ago.

PR for the IsActivePerson rule:
Update FilterRules addon for Gramps 6.0 by stevenyoungs · Pull Request #715 · gramps-project/addons-source

Note that there are other rules in this addon that also need adjusting to work with gramps 6.0.

1 Like

Thanks for looking at this issue.