Crash everytime I click 'Show Calendar' (UnicodeEncodeError)

Bug #1372127 reported by sunemi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Calendar-Indicator
New
Undecided
Unassigned

Bug Description

When I click 'Show Calendar' Apport just pops up telling me the app has crashed. I can reproduce this every time. I'm on Ubuntu 12.04 amd64. Calendar-Indicator version: 0.1.0.8.precise.1-1ubuntu1

From the apport .crash file I have:
Traceback:
 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'\xf8' in position 4: ordinal not in range(128)

From the last line it seems the app is trying to ascii-encode the character 'ø' (Latin Small Letter O With Stroke) which can't be done. In my country this character is used very commonly (both in event descriptions and in the name of some weekdays). Events with descriptions containing the character show up just fine on the list when I click the indicator.

Revision history for this message
sunemi (minddal) wrote :
Revision history for this message
sunemi (minddal) wrote :

Here is a very rough patch against my version (0.1.0.7.precise.2).

I simply utf-8-encode the event-summary before print is called. This stops the crashing and shows the calendar with all special characters in event summary.

Not sure about regressions though, since I don't know the codebase. (Will this affect event editing for instance?)

Revision history for this message
sunemi (minddal) wrote :

To avoid confusion about the version numbers. It's the same version, but different version numbers are reported from dpkg and the app itself.

[calendar icon in gnome-panel]-> 'Help' -> 'About' reports '0.1.0.7.precise.2'

but dpkg reports Version: 0.1.0.8.precise.1-1ubuntu1 (see below)

~$ dpkg -s calendar-indicator
Package: calendar-indicator
Status: install ok installed
Priority: extra
Section: utils
Installed-Size: 4168
Maintainer: Lorenzo Carbonell Cerezo <email address hidden>
Architecture: all
Version: 0.1.0.8.precise.1-1ubuntu1
Depends: python2.7, python (>= 2.7.1-0ubuntu2), python (<< 2.8), gir1.2-gtk-3.0, gir1.2-gdkpixbuf-2.0, gir1.2-appindicator3-0.1, gir1.2-notify-0.7, gir1.2-webkit-3.0, python-dateutil
Description: An indicator for Google Calendar
Homepage: http://www.atareao.es

Revision history for this message
Lincoln (loki-lawliet) wrote :

Same bug. Fixed by deleting all events with potential incorrect encoding.
But new error is, I have an event on Feb 2015. When I do "show calendar" I cannot browser Feb 2015 tab, others tab works fine. And the applet did not crash at that time.

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.