Comment 0 for bug 1522878

Revision history for this message
calder (krzysztof-klis) wrote :

"Show calendar" option crashes when the calendar contains an event with 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"))