python-evolution evolution.ecal has NoneType

Bug #1041785 reported by newbuntu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-python-desktop (Ubuntu)
New
Undecided
Unassigned

Bug Description

With python-evolution installed version 2.32.0+dfsg-2 in quantal, I get the following behavior:

>>> import evolution
>>> print evolution.ecal
None
>>> evolution.ecal.list_calendars()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'list_calendars'

With previous version 2.32.0-0ubuntu6, I get the expected behavior:
>>> import evolution
>>> print evolution.ecal
>>> evolution.ecal.list_calendars()
<module 'evolution.ecal' from '/usr/lib/python2.7/dist-packages/gtk-2.0/evolution/ecal.so'>
>>> evolution.ecal.list_calendars()
[('Personal', 'local:system') ................ ]

Other similar bugs in launchpad: LP #935883, #865988

Revision history for this message
newbuntu (dsglass) wrote :

Installing python-gnome2 solves this, because it adds the bonobo modules. ecal and ebook cannot be imported in python-evolution's __init__.py without bonobo:

Before installing python-gnome2:

>>> import evolution
>>> print evolution.ecal
None

>>> import ecal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named bonobo

After installing python-gnome2:

>>> import import evolution
>>> print evolution.ecal
<module 'evolution.ecal' from '/usr/lib/python2.7/dist-packages/gtk-2.0/evolution/ecal.so'>

This would be fixed by adding python-gnome2 to the python-evolution dependencies.

Revision history for this message
newbuntu (dsglass) wrote :

Installing python-gnome2 does not solve all the issues. Although ecal is imported properly, it does not function in every way it should.
For example, this is correct:
>>> calendars = evolution.ecal.list_calendars()
>>> calendars
[('Personal', 'local:system')]

But this is not (calendar does have events in it):
>>> cal = calendars[0]
>>> events = evolution.ecal.open_calendar_source(cal[1], evolution.ecal.CAL_SOURCE_TYPE_EVENT)
libecal-WARNING **: Cannot get cal from factory: GDBus.Error: the name org.gnome.dbus.evolution.Calendar1 is not provided by any .service files
>>> events
[]

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.