"Show calendar" crash when event name contains UTF chars

Bug #1522878 reported by calder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Calendar-Indicator
New
Undecided
Unassigned

Bug Description

Affects version installed from ppa:atareao/atareao on Ubuntu 12.04.

"Show calendar" option crashes when the calendar contains an event with a name containing a non-ascii character. Example stacktrace:

 Traceback (most recent call last):
   File "/usr/share/calendar-indicator/calendarindicator.py", line 361, in menu_show_calendar_response
     cd = CalendarWindow(self.googlecalendar,calendar_id=self.calendar_id)
   File "/usr/share/calendar-indicator/calendarwindow.py", line 233, in __init__
     self.set_date()
   File "/usr/share/calendar-indicator/calendarwindow.py", line 272, in set_date
     print(aevent['summary'])
 UnicodeEncodeError: 'ascii' codec can't encode character u'\u015b' in position 16: ordinal not in range(128)

To fix this I need to change line 272 in /usr/share/calendar-indicator/calendarwindow.py from:

print(aevent['summary'])

to:

print(aevent['summary'].encode('UTF-8'))

calder (krzysztof-klis)
description: updated
description: updated
calder (krzysztof-klis)
description: updated
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.