When I try to filter by name in Gramps, I get an error message.
145287: ERROR: grampsapp.py: line 187: Unhandled exception
Traceback (most recent call last):
File “C:\\Program Files\\GrampsAIO64-6.0.6\\gramps\\gui\\filters\\sidebar_sidebarfilter.py”, line 210, in key_press
self.clicked(obj)
File “C:\\Program Files\\GrampsAIO64-6.0.6\\gramps\\gui\\filters\\sidebar_sidebarfilter.py”, line 165, in clicked
self.clicked_func()
File “C:\\Program Files\\GrampsAIO64-6.0.6\\gramps\\plugins\\gramplet\\filter.py”, line 77, in \__filter_clicked
self.gui.view.build_tree()
File “C:\\Program Files\\GrampsAIO64-6.0.6\\gramps\\gui\\views\\listview.py”, line 363, in build_tree
self.model.rebuild_data()
File “C:\\Program Files\\GrampsAIO64-6.0.6\\gramps\\gui\\views\\treemodels\\flatbasemodel.py”, line 629, in \_rebuild_filter
dlist = self.search.apply(cdb, allkeys, tupleind=1, user=self.user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\\Program Files\\GrampsAIO64-6.0.6\\gramps\\gen\\filters_genericfilter.py”, line 315, in apply
res = self.apply_logical_op_to_all(db, possible_handles, apply_logical_op, user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “filterprogress.gpr.py”, line 192, in new_apply_logical_op_to_all
TypeError: Optimizer.**init**() missing 1 required positional argument: ‘top_level_filter’
When I try to filter by name in Gramps, I get an error message. I don’t know what I did wrong. Perhaps someone has a solution before I reinstall everything.
Re-installing is rarely a solution to exceptions thrown while running Gramps.
In this case, the call stack indicates you’re using filterprogress addon and I am not sure where that comes from. I can’t find it in Gramps addons. It’s possible it needs to be updated to match Gramps’ Optimizer class.
Please a open a bug report so it can be investigated. Thanks.
The Cancel button in the Filter progress dialog had a recent improvement. Formerly, canceling always failed with a warning that the current process was too important to interrupt. Now it actually interrupts when asked.
@kku did work to make the filtering cancel with both the Filter+ gramplets (which were rolled in the 6.0 core) and Filter Params addons.
And @dsblank said that the Cancel feature should be targeted when he was alerted that it wasn’t functional during the Filtering rewrite development.
So we should get their opinions.
But… I think that the most likely issue may be in a keybinding keystrokes being passed and acted upon before everything was ready.
There are other examples of this happening: when creating a new Child in a family where:
the given name data has been keyed in but the field is still active (so the field data has not been parsed)
the gender is unknown and waiting for the gender guessing (based on the statistics of the given name)
the commit keybinding is sent
the gender validation of a new person creation is needed.
In this situation, an error is generated and new person, although created, is not attached to the Family.
I think this may be similar.
Perhaps the Name filtering field has data entered but the field is still active. But a keybinding was used to start the filter. And the keybinding was also passed to the Cancel button of the Filter Progress dialog. So it tried to cancel the filter before it had initialized everything.
But obviously the internal Optimizer class has changed in 6.0.6 so that FilterProgress does not work anymore. Please remove the extension. Maybe I can also fix this at some point.
No, as far as I understand gramps_target_version = "6.0.6” would mean that the plugin requires at least the version 6.0.6 (i.e. any version 6.0.x where x is 6 or larger). So it is only possible to exclude versions from 6.0.0 to some 6.0.x.
Of course, it is possible to programmatically exclude any version in the plugin code itself.