ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded



Hey hackers,

I've recently decided to give Fedora 14 a try, because I saw it had
some newer packages than what I'd been developing against on Ubuntu
Maverick.

But, my program (which was running quite smoothly on Ubuntu) won't
even run on Fedora at all. Here is the code I've written:

https://github.com/robru/GottenGeography/blob/master/gottengeography.py

And when I run it:

$ ./gottengeography.py
ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/gi/importer.py",
line 52, in find_module
    repository.require(namespace)
RepositoryError: Requiring namespace 'Gtk' version '2.0', but '3.0' is
already loaded
ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/gi/importer.py",
line 52, in find_module
    repository.require(namespace)
RepositoryError: Requiring namespace 'Gtk' version '2.0', but '3.0' is
already loaded
Traceback (most recent call last):
  File "./gottengeography.py", line 24, in <module>
    from gi.repository import Clutter, Champlain, GtkChamplain
ImportError: cannot import name Champlain

Google hasn't been particularly helpful with this. I tried adding the
following back into my code (which I'd removed after a lengthy
discussion with J5):

import pygtk
pygtk.require('2.0')

and that had no effect, and then I tried this instead:

import pygtk
pygtk.require('3.0')

Just on a hunch, since it said that 3.0 was already loaded. But that
gave me this error instead:

$ ./gottengeography.py
Traceback (most recent call last):
  File "./gottengeography.py", line 23, in <module>
    pygtk.require('3.0')
  File "/usr/lib64/python2.7/site-packages/pygtk.py", line 85, in require
    "required version '%s' not found on system" % version
AssertionError: required version '3.0' not found on system

So I got rid of all that. Then I re-read the original error and I saw
it wasn't just complaining about gtk 2.0/3.0, but it also said
something about Champlain. So I checked, and sure enough I hadn't
fully installed champlain (I'd installed the package, but didn't
install libchamplain-python package, which was needed to get the
typelib file. But now it's in place and I'm still getting the error!

$ locate typelib|egrep -i clutter\|champlain\|gtk\|gconf
/usr/lib64/girepository-1.0/Champlain-0.6.typelib
/usr/lib64/girepository-1.0/Clutter-1.0.typelib
/usr/lib64/girepository-1.0/ClutterGst-1.0.typelib
/usr/lib64/girepository-1.0/GConf-2.0.typelib
/usr/lib64/girepository-1.0/Gtk-2.0.typelib
/usr/lib64/girepository-1.0/Gtk-3.0.typelib
/usr/lib64/girepository-1.0/GtkChamplain-0.6.typelib
/usr/lib64/girepository-1.0/GtkClutter-0.10.typelib
/usr/lib64/girepository-1.0/GtkSource-2.0.typelib
/usr/lib64/girepository-1.0/GtkVnc-1.0.typelib

What am I missing here? I wouldn't be surprised if there's just a
package that I've forgotten to install but I can't for the life of me
think of what's missing.

I walked through the imports in an interactive shell and found it was
a problem just with Champlain... hmmm...

$ python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gtk
>>> from gi.repository import GObject
>>> from gi.repository import Gdk
>>> from gi.repository import GdkPixbuf
>>> from gi.repository import GConf
>>> from gi.repository import Clutter
>>> from gi.repository import Champlain
ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/gi/importer.py",
line 52, in find_module
    repository.require(namespace)
RepositoryError: Requiring namespace 'Gtk' version '2.0', but '3.0' is
already loaded
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name Champlain
>>>

Any thoughts?

Thanks.

-- 
http://exolucere.ca


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]