GNOME Bugzilla – Bug 546589
ecal.list_task_sources() returns an empty list
Last modified: 2011-04-15 21:01:36 UTC
Currently: In [1]: import evolution In [2]: evolution.ecal.list_task_sources() Out[2]: [] It used to return a working cal and I do have tasks defined in e-d-s. Right now hamster-applet and conduit are unable to read TODO items stored in e-d-s.
Patryk this is weird, the code in g-p-d has not changed in months and the method doesn't do anything special: override evo_environment_list_task_sources noargs static PyObject* _wrap_evo_environment_list_task_sources(PyGObject *self) { GList *list = NULL; list = evo_environment_list_cal_sources(E_CAL_SOURCE_TYPE_TODO); return _helper_wrap_glist_of_evo_locations(list); } Maybe a change in evo_environment_list_cal_sources itself?
I'm puzzled. Upon further digging it seems the problem is there is no /apps/evolution/tasks/sources in gconf (that's what e_cal_get_sources returns) on my system. Yet Tasks works fine. I don't have Evolution installed at all. There seems to be a e_cal_new_system_tasks API call exposed by e-d-s but not in Python bindings.
Checked Tasks sources - it seems to always call e_cal_new_system_tasks and never even tries to look for TODO source types. Makes sense as IIRC Evolution won't allow you to create more or less than one such source.
See also bug #546825. As a workaround if ecal.list_task_sources yields an empty list I use: evolution.ecal.open_calendar_source('default', ecal.CAL_SOURCE_TYPE_TODO) as a fallback. Adding Conduit maintainers to CC as they are likely affected.
Haha, sorry about the CC part, only realized you are the maintainer of both after pressing submit, not enough coffee ;)
Works for me: >>> import evolution [55805 refs] >>> evolution.ecal.list_task_sources() [('Pessoal', 'file:///home/gjc/.evolution/tasks/local/system')]
(In reply to comment #6) > Works for me: > > >>> import evolution > [55805 refs] > >>> evolution.ecal.list_task_sources() > [('Pessoal', 'file:///home/gjc/.evolution/tasks/local/system')] > Works for me to. I actually asked on IRC about this. There was a transient bug in e-d-s about how it treated default sources, but I think the behaviour was subsequently fixed and I forgot to close the bug. I would also be interested to see if anyone else still sees this. I dont.
In [2]: evolution.ecal.list_task_sources() Out[2]: [] I am still affected by this. It seems the bug in e-d-s is no longer there but it did not actually fix the configuration so the default is still not listed there. In [4]: evolution.ecal.open_calendar_source('default', evolution.ecal.CAL_SOURCE_TYPE_TODO) ** (process:28779): DEBUG: Opening calendar source uri: default Out[4]: <ecal.ECal object at 0x83ce52c (ECal at 0x8448ea0)>
I think the remaining issue was fixed, as bug #647873 Please reopen, or perhaps file a new bug, if there is still a problem. *** This bug has been marked as a duplicate of bug 647873 ***