Problem with module 'evolution' after moving system

T

tinnews

I have just moved my desktop system (running xubuntu 10.04) to new
hardware. I have an almost trivial python program that uses the
evolution module which no longer works and I'm having trouble working
out why.

The program is:-

#!/usr/bin/python
#
#
#
#
import evolution
import sys


addrs = evolution.ebook.open_addressbook('default')

result = addrs.search(sys.argv[1])

print "Found ", len(result), " matches"
if len(result) > 0:
for nm in result:
print nm.get_property('email-1'), "\t", nm.get_property('full-name')
exit(0)
else:
exit(1)


When I run it I get the error:-

chris$ getEvoAddress.py zelma
Traceback (most recent call last):
File "/home/chris/bin/getEvoAddress.py", line 10, in <module>
addrs = evolution.ebook.open_addressbook('default')
AttributeError: 'NoneType' object has no attribute 'open_addressbook'

Using 'help' reveals basic information for evolution but reports "no
documentation ...." for evolution.ebook. On the old system (exactly
the same version of python, same OS, same everything just about)
"help(evolution.ebook)" shows the expected documentation.

So, what's wrong, is some python module missing that the evolution
module needs? (It's quite likely that there are far more modules
installed on the old system than the new one)
 
T

tinnews

Using 'help' reveals basic information for evolution but reports "no
documentation ...." for evolution.ebook. On the old system (exactly
the same version of python, same OS, same everything just about)
"help(evolution.ebook)" shows the expected documentation.

So, what's wrong, is some python module missing that the evolution
module needs? (It's quite likely that there are far more modules
installed on the old system than the new one)
A bit further trying to see what's wrong it seems that Python is
failing to load .so libraries for some reason on the system where it
doesn't work.

The initialisation code in the evolution module has:-

import ebook

So, obviously this works on the old system but not on the new system.
The ebook.so file is present on both systems in exactly the same place.
 
T

tinnews

A bit further trying to see what's wrong it seems that Python is
failing to load .so libraries for some reason on the system where it
doesn't work.

The initialisation code in the evolution module has:-

import ebook

So, obviously this works on the old system but not on the new system.
The ebook.so file is present on both systems in exactly the same place.
..... and I've finally found what was missing, I tried:-

import evolution.ebook

and it told me that 'import bonobo' was failing. A little searching
and I found that python-gnome2 (which includes bonobo) was installed
on the old system but not on the new one. Installing it has fixed my
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top