Different capitalization in tags causes task list to be broken

Bug #1791524 reported by vanadium on 2018-09-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Today I noticed that clicking the button to display the task list (Task list needs to be activated in Edit - Preferences) would trigger an error rather than displaying the task list.

This is zim 0.68
Platform: posix
Locale: en_US UTF-8
FS encoding: UTF-8
Python: (2, 7, 15, 'candidate', 1)
Gtk: (2, 24, 32)
Pygtk: (2, 24, 0)
No bzr version-info found

======= Traceback =======
  File "/usr/lib/python2.7/dist-packages/zim/actions.py", line 157, in do_activate
    self.__get__(instance, instance.__class__)()
  File "/usr/lib/python2.7/dist-packages/zim/actions.py", line 140, in func
    self.func(instance, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tasklist/__init__.py", line 169, in show_task_list
    dialog = TaskListDialog.unique(self, self.window, tasksview, self.plugin.preferences)
  File "/usr/lib/python2.7/dist-packages/zim/gui/widgets.py", line 2973, in unique
    dialog = klass(*args, **opts)
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tasklist/gui.py", line 124, in __init__
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tasklist/gui.py", line 476, in __init__
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tasklist/gui.py", line 496, in refresh
    self._tags[prev[1]] += self._tags[tag[1]]
KeyError: u'Yves'

By elimination (moving sections of the notebook out and back in) I found that the issue was related to having a tag with different capitalization. In my case, I had the tags @YVES and @Yves. Replacing all occurrences of @Yves with @YVES resulted in the task list to open correctly.

It is probably not uncommon for a user to enter a tag with different capitalisation sometime, so probably the software should anticipate on this possibility.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers