Problem with module 'evolution' after moving system

Discussion in 'Python' started by tinnews@isbd.co.uk, Nov 24, 2010.

  1. Guest

    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)

    --
    Chris Green
     
    , Nov 24, 2010
    #1
    1. Advertising

  2. Guest

    wrote:
    [snip]

    > 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.

    --
    Chris Green
     
    , Nov 24, 2010
    #2
    1. Advertising

  3. Guest

    wrote:
    > wrote:
    > [snip]
    >
    > > 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.
    >

    ..... 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.

    --
    Chris Green
     
    , Nov 24, 2010
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carlos Santana

    Next Evolution in ADO.NET

    Carlos Santana, Aug 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,173
    Carlos Santana
    Aug 14, 2003
  2. linkswanted
    Replies:
    0
    Views:
    1,268
    linkswanted
    Dec 21, 2007
  3. linkswanted
    Replies:
    0
    Views:
    1,601
    linkswanted
    Jan 6, 2008
  4. linkswanted
    Replies:
    0
    Views:
    467
    linkswanted
    Jan 23, 2008
  5. linkswanted
    Replies:
    0
    Views:
    659
    linkswanted
    Jan 24, 2008
Loading...

Share This Page