Problem with remove_tag() method - AttributeError: 'NoneType' object has no attribute 'get_children'

Bug #1095451 reported by Tom Kadwill on 2013-01-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Whist implementing a delete tag feature (for bug #1044639) I encountered a problem with the remove_tag() method. The issue does not cause a problem with GTG in terms of functionality but shows an error when running from the debug script.

To reproduce the error use the remove_tag() method to remove a tag (or hit the delete key if my solution for bug #1044639 has been merged). Then open a task a hit backspace, you should then see an error and associated stack trace in the terminal. I have pasted mine below as an example:

Traceback (most recent call last):
  File "/home/tom/bazaar/gtg/delete-tag2/GTG/gtk/editor/", line 586, in modified
  File "/home/tom/bazaar/gtg/delete-tag2/GTG/gtk/editor/", line 513, in light_save
  File "/home/tom/bazaar/gtg/delete-tag2/GTG/gtk/editor/", line 497, in save
  File "/home/tom/bazaar/gtg/delete-tag2/GTG/core/", line 612, in sync
  File "/usr/lib/python2.7/dist-packages/liblarch/", line 51, in modified
    self.tree.modify_node(self.node_id, priority=priority)
  File "/usr/lib/python2.7/dist-packages/liblarch/", line 88, in modify_node
    self._queue.push(self._modify_node, node_id, priority=priority)
  File "/usr/lib/python2.7/dist-packages/liblarch/", line 65, in push
  File "/usr/lib/python2.7/dist-packages/liblarch/", line 269, in _modify_node
    self._callback('node-modified', node_id)
  File "/usr/lib/python2.7/dist-packages/liblarch/", line 78, in _callback
  File "/usr/lib/python2.7/dist-packages/liblarch/", line 85, in __modify
    displayed &= filt.is_displayed(nid)
  File "/usr/lib/python2.7/dist-packages/liblarch/", line 42, in is_displayed
    value = self.func(task, parameters=self.dic)
  File "/home/tom/bazaar/gtg/delete-tag2/GTG/core/", line 146, in tag_filter
    return node.has_tags([tag])
  File "/home/tom/bazaar/gtg/delete-tag2/GTG/core/", line 767, in has_tags
    toreturn = children_tag(tagname)
  File "/home/tom/bazaar/gtg/delete-tag2/GTG/core/", line 751, in children_tag
    for tagc_name in tag.get_children():
AttributeError: 'NoneType' object has no attribute 'get_children'

Jeff Fortin Tam (kiddo) on 2020-12-29
Changed in gtg:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers