← Back to team overview

gtg team mailing list archive

[Bug 549895] Re: Error when marking task as undone

 

Trunk has a lot of bugs due to the recent refactoring.

 This bug certainty need fixing, but we shouldn't use exceptions to make
things work. Exceptions should be used only to catch exceptional things
(like "the internet is down" or, "we are past 2012, how come?"), not to
handle things which are in the normal flow of the program.

Thanks for pointing that bug out!

** Tags added: regression

** Changed in: gtg
   Importance: Undecided => High

** Changed in: gtg
       Status: New => Confirmed

** Changed in: gtg
    Milestone: None => 0.3

** Description changed:

  Hi!
  
- I'm using GTG! 3.0 from trunk (rev 709). 
+ I'm using GTG!  from trunk (rev 709).
  When I have only one 'parent' task with a sub-tasks marked as "done" and I marking it as "undone" an error occurs:
  
  Traceback (most recent call last):
-   File "/home/prmtl/gtg/GTG/taskbrowser/tasktree.py", line 191, in update_task
-     node_path = self.tree.get_path_for_node(my_node)
-   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 240, in get_path_for_node
-     child = self.node_children(par)
-   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 306, in node_children
-     child = self.virtual_root[0]
+   File "/home/prmtl/gtg/GTG/taskbrowser/tasktree.py", line 191, in update_task
+     node_path = self.tree.get_path_for_node(my_node)
+   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 240, in get_path_for_node
+     child = self.node_children(par)
+   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 306, in node_children
+     child = self.virtual_root[0]
  IndexError: list index out of range
  
  Traceback (most recent call last):
-   File "/home/prmtl/gtg/GTG/taskbrowser/tasktree.py", line 191, in update_task
-     node_path = self.tree.get_path_for_node(my_node)
-   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 240, in get_path_for_node
-     child = self.node_children(par)
-   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 306, in node_children
-     child = self.virtual_root[0]
+   File "/home/prmtl/gtg/GTG/taskbrowser/tasktree.py", line 191, in update_task
+     node_path = self.tree.get_path_for_node(my_node)
+   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 240, in get_path_for_node
+     child = self.node_children(par)
+   File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 306, in node_children
+     child = self.virtual_root[0]
  IndexError: list index out of range
  
  When I change the code of filteredtree.py (patch in attachment) it works
  again, but in terminal:
  
  *** Node 17@1 not in vr and no path for parent
  *** please report a bug against FilteredTree

-- 
Error when marking task as undone
https://bugs.launchpad.net/bugs/549895
You received this bug notification because you are a member of Gtg
contributors, which is subscribed to Getting Things GNOME!.

Status in Getting Things GNOME!: Confirmed

Bug description:
Hi!

I'm using GTG!  from trunk (rev 709).
When I have only one 'parent' task with a sub-tasks marked as "done" and I marking it as "undone" an error occurs:

Traceback (most recent call last):
  File "/home/prmtl/gtg/GTG/taskbrowser/tasktree.py", line 191, in update_task
    node_path = self.tree.get_path_for_node(my_node)
  File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 240, in get_path_for_node
    child = self.node_children(par)
  File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 306, in node_children
    child = self.virtual_root[0]
IndexError: list index out of range

Traceback (most recent call last):
  File "/home/prmtl/gtg/GTG/taskbrowser/tasktree.py", line 191, in update_task
    node_path = self.tree.get_path_for_node(my_node)
  File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 240, in get_path_for_node
    child = self.node_children(par)
  File "/home/prmtl/gtg/GTG/core/filteredtree.py", line 306, in node_children
    child = self.virtual_root[0]
IndexError: list index out of range

When I change the code of filteredtree.py (patch in attachment) it works again, but in terminal:

*** Node 17@1 not in vr and no path for parent
*** please report a bug against FilteredTree







References