GTG

GTG crashed on adding new task (unicode)

Bug #987067 reported by Muraki Kazutaka
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
High
Izidor Matušov

Bug Description

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/liblarch/processqueue.py", line 42, in process_queue
    func(*action[1:])
  File "/usr/lib/python2.7/dist-packages/liblarch/__init__.py", line 248, in __emit
    func(node_id,path)
  File "/usr/share/gtg/GTG/plugins/notification_area/notification_area.py", line 200, in __on_task_added
    self.__tasks_menu.add(tid, (task.get_due_date(), title), menu_item)
  File "/usr/share/gtg/GTG/plugins/notification_area/notification_area.py", line 327, in add
    self.sorted_keys.sort()
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 28-29: invalid continuation byte

Related branches

Revision history for this message
Izidor Matušov (izidor) wrote :

It looks like a unicode problem. However, I have troubles with reproducing it. Could you tell me, do you have any special characters in your task title? I tried to reproduce it with russian alphabet, without a problem.

Changed in gtg:
status: New → Incomplete
Revision history for this message
Martin Lukeš (martin-meridius) wrote :

Hi,
I have the same problem with version 0.2.9. The error is almost the same:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/liblarch/processqueue.py", line 42, in process_queue
    func(*action[1:])
  File "/usr/lib/python2.7/dist-packages/liblarch/__init__.py", line 248, in __emit
    func(node_id,path)
  File "/usr/share/gtg/GTG/plugins/notification_area/notification_area.py", line 200, in __on_task_added
    self.__tasks_menu.add(tid, (task.get_due_date(), title), menu_item)
  File "/usr/share/gtg/GTG/plugins/notification_area/notification_area.py", line 327, in add
    self.sorted_keys.sort()
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 29: invalid continuation byte

How to reproduce:
Create new task and add it sub-task writing:
- ovládání testů by mělo jít pouze myší

The app crashes as soon as you hit Enter.

Izidor Matušov (izidor)
Changed in gtg:
status: Incomplete → In Progress
importance: Undecided → High
milestone: none → 0.3
assignee: nobody → Izidor Matušov (izidor)
Revision history for this message
Izidor Matušov (izidor) wrote :

Martin> thanks for the reproducer. I made a patch, waiting for a review.

If it is a blocker for you, you can apply the patch yourself by opening /usr/share/gtg/GTG/core/task.py and adding two lines:

<code>
        if isinstance(title, str):
            title = title.decode('utf8')
</code>

after line

<code>
         old_title = self.title
</code>

summary: - GTG crashed on adding new task
+ GTG crashed on adding new task (unicode)
Izidor Matušov (izidor)
Changed in gtg:
status: In Progress → Fix Committed
Revision history for this message
Martin Lukeš (martin-meridius) wrote :

Your patch is working great Izidor, thank you!

Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.