CardView
CardView copied to clipboard
Unhandled exception while trying to click on People view after a TypeError in Event view
After trying to click on people in Event view getting a TypeError, I've clicked on People view and got this:
153272: ERROR: grampsapp.py: line 157: Unhandled exception Traceback (most recent call last): File "C:\Program Files\GrampsAIO64-5.1.3\gramps\gui\viewmanager.py", line 871, in view_changed self.__change_page(page_num) File "C:\Program Files\GrampsAIO64-5.1.3\gramps\gui\viewmanager.py", line 882, in __change_page self.active_page.set_active() File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\card_view.py", line 512, in set_active ExtendedNavigationView.set_active(self) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\extended_navigation.py", line 243, in set_active PageView.set_active(self) File "C:\Program Files\GrampsAIO64-5.1.3\gramps\gui\views\pageview.py", line 335, in set_active self.build_tree() File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\card_view.py", line 393, in build_tree self.change_object(active_object) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\card_view.py", line 443, in change_object self._render_page(page_context) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\card_view.py", line 454, in _render_page view = view_builder(self.grstate, page_context) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\views\view_builder.py", line 91, in view_builder return view(grstate, grcontext) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\views\view_person.py", line 46, in init GrampsObjectView.init(self, grstate, grcontext) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\views\view_base.py", line 80, in init self.render_view() File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\views\view_base.py", line 86, in render_view self.build_view() File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\views\view_person.py", line 70, in build_view self.grcontext.primary_obj, age_base=age_base File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\views\view_base.py", line 170, in build_object_groups group_list, gramps_obj.obj, age_base=age_base File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\views\view_base.py", line 184, in get_object_groups {key: group_builder(self.grstate, key, obj, args)} File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\groups\group_builder.py", line 65, in group_builder group = get_parents_group(grstate, obj, args) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\groups\group_builder.py", line 210, in get_parents_group grstate, family, args, context="parent", relation=person File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\groups\group_builder.py", line 179, in get_family_unit person=relation, File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\groups\group_builder.py", line 149, in get_children_group group = ChildrenFrameGroup(grstate, groptions, family) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\groups\group_children.py", line 84, in init child_ref, File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\frames\frame_child_ref.py", line 68, in init reference_tuple=(family, child_ref), File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\frames\frame_person.py", line 80, in init self, grstate, groptions, person, reference_tuple=reference_tuple File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\frames\frame_reference.py", line 92, in init reference_tuple=reference_tuple, File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\frames\frame_primary.py", line 101, in init self.load_layout() File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\frames\frame_primary.py", line 121, in load_layout self.widgets["icons"].load(self.primary, title=self.get_title()) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\frames\frame_widgets.py", line 252, in load self.load_status(grobject) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\frames\frame_widgets.py", line 265, in load_status for icon in status_service.get_status(self.grstate, grobject.obj): File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\services\service_status.py", line 110, in get_status status = status_check(grstate, obj) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\status_todo.py", line 182, in get_todo_status evaluate_object(db, obj, obj_path, todo_list) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\status_todo.py", line 297, in evaluate_object new_obj_path = obj_path + [describe_object(db, child_obj)] File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\view\common\common_utils.py", line 595, in describe_object title.split("]")[1].strip(), IndexError: list index out of range
I've got the same issue after restarting Gramps and just trying to display one person changing from grouped view to CV
Thanks for reporting this bug! I will take a look when I have time.
I just pushed what I think will fix this for you, if you have a chance to pull down and retest let me know results. Thanks!
It's okay now. It still continue to have some TypeError (i.e in events when clickink on a person), CV is not doing what I want (it don't go to persons view) but if I move to that view manually it display the person I expected with no more error
Oups...
I've clicked on an event of previous person, CV have given a TypeError, I've moved to the events view then I've came back to people and I've got this:
427228: ERROR: grampsapp.py: line 157: Unhandled exception Traceback (most recent call last): File "C:\Program Files\GrampsAIO64-5.1.3\gramps\gui\viewmanager.py", line 871, in view_changed self.__change_page(page_num) File "C:\Program Files\GrampsAIO64-5.1.3\gramps\gui\viewmanager.py", line 882, in __change_page self.active_page.set_active() File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\card_view.py", line 512, in set_active ExtendedNavigationView.set_active(self) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\extended_navigation.py", line 243, in set_active PageView.set_active(self) File "C:\Program Files\GrampsAIO64-5.1.3\gramps\gui\views\pageview.py", line 335, in set_active self.build_tree() File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\card_view.py", line 393, in build_tree self.change_object(active_object) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\card_view.py", line 432, in change_object return self.change_category(obj_tuple[0]) File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\CardView\src\extended_navigation.py", line 215, in change_category primary_category TypeError: list indices must be integers or slices, not NoneType
I am unable to reproduce this. I also spun up a Windows VM and installed 5.1.3 and couldn't reproduce on that either. I add some code to print the category causing the error, as I currently don't see how it can happen, if you could reproduce and let me know what it outputs.
@patlx I think this one is fixed. Does it still occur for you?