Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40530 - gdesklet 0.25 fails with ImportError: could not import bonobo.ui
Summary: gdesklet 0.25 fails with ImportError: could not import bonobo.ui
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-05 14:43 UTC by Allan Graves
Modified: 2004-04-02 07:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Graves 2004-02-05 14:43:46 UTC
this bug would at first seem to be like bug: 33909

Unfortunately, 33909 seems to be related to a libssl, whereas the output of 
python -c "import bonobo.ui" is different for me, failing with a "RuntimeError: could not load typelib"


here is the python -v /usr/bin/gdesklets output:

bink gtk-2.0 # python -v /usr/bin/gdesklets
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.3/site.pyc matches /usr/lib/python2.3/site.py
import site # precompiled from /usr/lib/python2.3/site.pyc
# /usr/lib/python2.3/os.pyc matches /usr/lib/python2.3/os.py
import os # precompiled from /usr/lib/python2.3/os.pyc
import posix # builtin
# /usr/lib/python2.3/posixpath.pyc matches /usr/lib/python2.3/posixpath.py
import posixpath # precompiled from /usr/lib/python2.3/posixpath.pyc
# /usr/lib/python2.3/stat.pyc matches /usr/lib/python2.3/stat.py
import stat # precompiled from /usr/lib/python2.3/stat.pyc
# /usr/lib/python2.3/UserDict.pyc matches /usr/lib/python2.3/UserDict.py
import UserDict # precompiled from /usr/lib/python2.3/UserDict.pyc
# /usr/lib/python2.3/copy_reg.pyc matches /usr/lib/python2.3/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.3/copy_reg.pyc
# /usr/lib/python2.3/types.pyc matches /usr/lib/python2.3/types.py
import types # precompiled from /usr/lib/python2.3/types.pyc
# /usr/lib/python2.3/warnings.pyc matches /usr/lib/python2.3/warnings.py
import warnings # precompiled from /usr/lib/python2.3/warnings.pyc
# /usr/lib/python2.3/linecache.pyc matches /usr/lib/python2.3/linecache.py
import linecache # precompiled from /usr/lib/python2.3/linecache.pyc
import encodings # directory /usr/lib/python2.3/encodings
# /usr/lib/python2.3/encodings/__init__.pyc matches /usr/lib/python2.3/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.3/encodings/__init__.pyc
# /usr/lib/python2.3/codecs.pyc matches /usr/lib/python2.3/codecs.py
import codecs # precompiled from /usr/lib/python2.3/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.3/encodings/aliases.pyc matches /usr/lib/python2.3/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.3/encodings/aliases.pyc
# /usr/lib/python2.3/encodings/ascii.pyc matches /usr/lib/python2.3/encodings/ascii.py
import encodings.ascii # precompiled from /usr/lib/python2.3/encodings/ascii.pyc
Python 2.3.3 (#1, Feb  5 2004, 14:25:15) 
[GCC 3.3.2 20031022 (Gentoo Linux 3.3.2-r2, propolice)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import main # directory /usr/share/gdesklets/main
# /usr/share/gdesklets/main/__init__.pyc matches /usr/share/gdesklets/main/__init__.py
import main # precompiled from /usr/share/gdesklets/main/__init__.pyc
# /usr/lib/python2.3/site-packages/pygtk.pyc matches /usr/lib/python2.3/site-packages/pygtk.py
import pygtk # precompiled from /usr/lib/python2.3/site-packages/pygtk.pyc
# /usr/lib/python2.3/fnmatch.pyc matches /usr/lib/python2.3/fnmatch.py
import fnmatch # precompiled from /usr/lib/python2.3/fnmatch.pyc
# /usr/lib/python2.3/re.pyc matches /usr/lib/python2.3/re.py
import re # precompiled from /usr/lib/python2.3/re.pyc
# /usr/lib/python2.3/sre.pyc matches /usr/lib/python2.3/sre.py
import sre # precompiled from /usr/lib/python2.3/sre.pyc
# /usr/lib/python2.3/sre_compile.pyc matches /usr/lib/python2.3/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.3/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.3/sre_constants.pyc matches /usr/lib/python2.3/sre_constants.py
import sre_constants # precompiled from /usr/lib/python2.3/sre_constants.pyc
# /usr/lib/python2.3/sre_parse.pyc matches /usr/lib/python2.3/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.3/sre_parse.pyc
# /usr/lib/python2.3/string.pyc matches /usr/lib/python2.3/string.py
import string # precompiled from /usr/lib/python2.3/string.pyc
dlopen("/usr/lib/python2.3/lib-dynload/strop.so", 2);
import strop # dynamically loaded from /usr/lib/python2.3/lib-dynload/strop.so
# /usr/lib/python2.3/glob.pyc matches /usr/lib/python2.3/glob.py
import glob # precompiled from /usr/lib/python2.3/glob.pyc
import gnome # directory /usr/lib/python2.3/site-packages/gtk-2.0/gnome
# /usr/lib/python2.3/site-packages/gtk-2.0/gnome/__init__.pyc matches /usr/lib/python2.3/site-packages/gtk-2.0/gnome/__init__.py
import gnome # precompiled from /usr/lib/python2.3/site-packages/gtk-2.0/gnome/__init__.pyc
dlopen("/usr/lib/python2.3/site-packages/gtk-2.0/gobject.so", 2);
import gobject # dynamically loaded from /usr/lib/python2.3/site-packages/gtk-2.0/gobject.so
dlopen("/usr/lib/python2.3/site-packages/gtk-2.0/gnome/_gnome.so", 2);
import gnome._gnome # dynamically loaded from /usr/lib/python2.3/site-packages/gtk-2.0/gnome/_gnome.so
dlopen("/usr/lib/python2.3/site-packages/gtk-2.0/gnome/ui.so", 2);
import bonobo # directory /usr/lib/python2.3/site-packages/gtk-2.0/bonobo
# /usr/lib/python2.3/site-packages/gtk-2.0/bonobo/__init__.pyc matches /usr/lib/python2.3/site-packages/gtk-2.0/bonobo/__init__.py
import bonobo # precompiled from /usr/lib/python2.3/site-packages/gtk-2.0/bonobo/__init__.pyc
dlopen("/usr/lib/python2.3/site-packages/ORBit.so", 2);
# /usr/lib/python2.3/keyword.pyc matches /usr/lib/python2.3/keyword.py
import keyword # precompiled from /usr/lib/python2.3/keyword.pyc
import ORBit # dynamically loaded from /usr/lib/python2.3/site-packages/ORBit.so
Traceback (most recent call last):
  File "/usr/bin/gdesklets", line 4, in ?
    from main import HOME
  File "/usr/share/gdesklets/main/__init__.py", line 46, in ?
    import gnome.ui
ImportError: could not import bonobo.ui
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] site
# cleanup[1] encodings
# cleanup[1] sre_constants
# cleanup[1] _codecs
# cleanup[1] main
# cleanup[1] zipimport
# cleanup[1] warnings
# cleanup[1] encodings.ascii
# cleanup[1] pygtk
# cleanup[1] codecs
# cleanup[1] types
# cleanup[1] strop
# cleanup[1] gnome
# cleanup[1] keyword
# cleanup[1] sre
# cleanup[1] signal
# cleanup[1] gnome._gnome
# cleanup[1] linecache
# cleanup[1] posix
# cleanup[1] encodings.aliases
# cleanup[1] exceptions
# cleanup[1] sre_parse
# cleanup[1] bonobo
# cleanup[1] sre_compile
# cleanup[1] _sre
# cleanup[1] gnome.ui
# cleanup[1] glob
# cleanup[1] string
# cleanup[1] ORBit
# cleanup[1] fnmatch
# cleanup[1] re
# cleanup[2] CORBA
# cleanup[2] copy_reg
# cleanup[2] ORBit.CORBA
# cleanup[2] gobject
# cleanup[2] ORBit.PortableServer
# cleanup[2] posixpath
# cleanup[2] os.path
# cleanup[2] stat
# cleanup[2] UserDict
# cleanup[2] os
# cleanup[2] PortableServer
# cleanup sys
# cleanup __builtin__
# cleanup ints: 8 unfreed ints in 8 out of 107 blocks
# cleanup floats


----
here is the output of python -c "import bonobo.ui"
bink gtk-2.0 # python -c "import bonobo.ui"
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/lib/python2.3/site-packages/gtk-2.0/bonobo/__init__.py", line 7, in ?
    ORBit.load_typelib('Bonobo')
RuntimeError: could not load typelib

above is where it differs from 33909.

------
bink gtk-2.0 #  ls -ail /usr/lib/python2.3/site-packages/gtk-2.0/bonobo/ui.so
 607353 -rwxr-xr-x    1 root     root       116024 Feb  5 16:43 /usr/lib/python2.3/site-packages/gtk-2.0/bonobo/ui.so

----

bink gtk-2.0 # epm -q python pygtk gnome-python libbonobo libbonoboui
python-2.2.3-r5
python-2.3.3
pygtk-2.0.0-r1
gnome-python-1.4.2
gnome-python-2.0.0-r1
libbonobo-2.4.3
libbonoboui-2.4.3

Please let me know if I can help at all.  Thanx!

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Brendan Dahl 2004-02-09 19:54:02 UTC
I too recently had this problem here is what I did to fix it:
emerged

libbonobo
libbonoboui
pygtk
gnome-python
pyorbit

Not really sure which one fixed it but finally worked after pyorbit.
Comment 2 Allan Graves 2004-02-10 12:24:01 UTC
After reemerging all packages, I still have the same problem.
Comment 3 Mike Gardiner (RETIRED) gentoo-dev 2004-02-10 15:33:00 UTC
Did you recently upgrade from python 2.2 to python 2.3 ? and if so, have you run python-updater ?
Comment 4 Allan Graves 2004-02-11 06:12:56 UTC
i was running 2.2, then upgraded to 2.3 when gdesklets failed to work.  I have run the python-updater script, and it claims everything is updated.
Comment 5 caolan 2004-04-01 08:14:16 UTC
I have the same problems with pygtk gnome scripts, and no real solution. But as a workaround, you can try and change the occurances in the .py file which breaks from

import gnome.ui

to

try:
    import gnome.ui
except:
    import gnome.ui

i.e. try to load gnome.ui twice, strange as it seems, this works for me :-) 

try:
    import bonobo.ui
except:
    import bonobo.ui
import gnome.ui
also works, bonobo.ui being the real offender
Comment 6 Allan Graves 2004-04-02 07:21:13 UTC
that worked!  thank you!