GTG

Gnome 3.2 issue: 'NoneType' object has no attribute 'ICAL_STATUS_CONFIRMED'

Bug #865988 reported by Juanma Hernández
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Medium
Izidor Matušov

Bug Description

Arch Linux
evolution 3.2.0
python-evolution 2.32.0
gtg-bzr 1012

It seems that something in evolution has changed.

2011-10-04 10:17:41,333 - DEBUG - gtg:core_main_init:135 - Debug output enabled.
2011-10-04 10:17:41,375 - DEBUG - __init__:__init__:68 - Backends found: ['backend_rtm', 'backend_twitter', 'backend_launchpad', 'backend_localfile', 'backend_identica', 'backend_evolution', 'backend_gnote', 'backend_tomboy']
2011-10-04 10:17:41,442 - DEBUG - __init__:__init__:77 - Backend backend_twitter could not be loaded: No module named tweepy.models
2011-10-04 10:17:41,443 - DEBUG - __init__:__init__:77 - Backend backend_launchpad could not be loaded: No module named launchpadlib.launchpad
Traceback (most recent call last):
  File "/usr/bin/gtg", line 69, in <module>
    sys.exit(GTG.gtg.main(options, args))
  File "/usr/lib/python2.7/site-packages/GTG/gtg.py", line 114, in main
    ds, req = core_main_init(options, args)
  File "/usr/lib/python2.7/site-packages/GTG/gtg.py", line 141, in core_main_init
    backends_list = BackendFactory().get_saved_backends_list()
  File "/usr/lib/python2.7/site-packages/GTG/backends/__init__.py", line 73, in __init__
    __import__(extended_module_name)
  File "/usr/lib/python2.7/site-packages/GTG/backends/backend_evolution.py", line 43, in <module>
    {Task.STA_ACTIVE: evolution.ecal.ICAL_STATUS_CONFIRMED,
AttributeError: 'NoneType' object has no attribute 'ICAL_STATUS_CONFIRMED'

Revision history for this message
Izidor Matušov (izidor) wrote :

Hi Juanma,

this kind of bug is quite a strange for me. It seems to me, that you don't have evolution.ecal library.

My python-evolution is 2.32.0-0ubuntu2

Try please the following: run python console and insert those commands:

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

I suppose, that the last line will be None.

Changed in gtg:
status: New → Incomplete
importance: Undecided → Medium
milestone: none → 0.3
assignee: nobody → Izidor Matušov (izidor)
Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

This is a bit weird. If I uninstall python-evolution, it works.

Revision history for this message
Izidor Matušov (izidor) wrote :

It works without python-evolution? It shouldn't... Don't you have installed mutliple version of evolution/python-evolution?

Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

Without python-evolution I get this extra line:

2011-10-05 05:58:36,708 - DEBUG - __init__:__init__:77 - Backend backend_evolution could not be loaded: No module named evolution

Likewise I haven't python-twitter nor python-launchpad installed.

2011-10-05 05:58:35,785 - DEBUG - __init__:__init__:77 - Backend backend_launchpad could not be loaded: No module named launchpadlib.launchpad
2011-10-05 05:58:35,895 - DEBUG - __init__:__init__:77 - Backend backend_twitter could not be loaded: No module named tweepy.models

Revision history for this message
Izidor Matušov (izidor) wrote :

Okay, I understand that. When you don't have python-evolution, the dependencies of a backend are not met and the backend is disabled. That is a requested behavior. I can see two sub-problems for this bug:

1) If backend has problem with its malformed code, GTG should start anyway and disable the backend.
2) Why python-evolution does not have ecal submodule? I'm going to install Archlinux and try it for myself...

Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

Both, with and without python bindings for evolution I get this:

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

library is in /usr/lib/python2.7/site-packages/gtk-2.0/evolution/ecal.so

Could be maybe a python-evolution package bug?. I checked changes from last release of package and I don't find anything able to cause this.

http://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/gnome-python-desktop&id=82de1538d8ad8462d26c877a1e9e4ad6b2f4f87a

Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

Sorry, without python bindings for evolution I get this:

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

Revision history for this message
Izidor Matušov (izidor) wrote :

Personally I can see that as a bug of package. What is the content of /usr/lib/python2.7/site-packages/gtk-2.0/evolution/__init__.py?

Revision history for this message
Izidor Matušov (izidor) wrote :

I've updated the code. Now if there is a buggy backend, GTG just ignore that backend. The point #1 solved in rev 1013.

The second point is much more interesting!

Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

The content of /usr/lib/python2.7/site-packages/gtk-2.0/evolution/__init__.py:

try:
    import ebook
except ImportError:
    ebook = None
    __version__ = None
else:
    __version__ = ebook.__version__

try:
    import ecal
except ImportError:
    ecal = None

Revision history for this message
Izidor Matušov (izidor) wrote :

There might be problem with importing ecal... Please, change

try:
    import ecal
except ImportError:
    ecal = None

into

import ecal

After that try to run python and issue commands
>>> import evolution
>>> print evolution.ecal

It should assert some kind of error. (I think, it might be a problem with package)

Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

You were right, it lacks a library:

>>> import ecal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libecal-1.2.so.8: cannot open shared object file: No such file or directory

In Arch Linux, there's version 10 instead of 8: /usr/lib/libecal-1.2.so.10 is owned by evolution-data-server 3.2.0-2

Gnome 3.0 still used libecal-1.2.so.8, because it worked before.

There's no python-evolution 3.2 in Arch Linux yet, since latest gnome-python-desktop is 2.32.

I'll report a bug. Thanks

Revision history for this message
Izidor Matušov (izidor) wrote :

I'm glad the problem was found. Closing this bug.

Changed in gtg:
status: Incomplete → Fix Committed
Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

It seems that whole gnome-python-* is deprecated. Because of this, evolution backend won't work anymore in gnome >= 3.2.

Revision history for this message
Juanma Hernández (juanmah-gmail) wrote :

Recompiling python-evolution had revived the evolution backend.

Izidor Matušov (izidor)
Changed in gtg:
milestone: 0.3 → 0.2.9
Izidor Matušov (izidor)
Changed in gtg:
status: Fix Committed → Fix Released
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.