From b3ceb3e828156af4b9bd88fc59a63f6683240681 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Tue, 15 Jan 2013 19:49:07 +0000 Subject: [PATCH] 6338: NotImplementedError on Export a View to a spreadsheet from the People Category svn: r21136 --- gramps/gui/views/listview.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 0fc02e47b..b8d192845 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -1063,8 +1063,10 @@ class ListView(NavigationView): ofile.end_row() else: # Tree model - node = self.model.get_node_from_iter(self.model.do_get_iter((0,))[1]) - self.write_node(node, len(levels), [], ofile, data_cols) + hasmodel, iter = self.model.do_get_iter((0,)) + if hasmodel: + node = self.model.get_node_from_iter(iter) + self.write_node(node, len(levels), [], ofile, data_cols) ofile.end_page() ofile.close()