Re: ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
- From: John Palmieri <johnp redhat com>
- To: Robert Park <rbpark exolucere ca>
- Cc: libchamplain-list gnome org, python-hackers-list <python-hackers-list gnome org>
- Subject: Re: ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
- Date: Tue, 16 Nov 2010 13:13:54 -0500 (EST)
----- "Robert Park" <rbpark exolucere ca> wrote:
> On Mon, Nov 15, 2010 at 9:29 PM, Robert Park <rbpark exolucere ca>
> wrote:
> > I walked through the imports in an interactive shell and found it
> was
> > a problem just with Champlain... hmmm...
>
> Did some more testing, and I've found that if I change the imports
> from this order:
>
> from gi.repository import Gtk, GObject, Gdk, GdkPixbuf, GConf
> from gi.repository import Clutter, Champlain, GtkChamplain
>
> to this order (note GtkChamplain before Champlain, and those before
> Gtk):
>
> from gi.repository import Clutter, GtkChamplain, Champlain
> from gi.repository import Gtk, GObject, Gdk, GdkPixbuf, GConf
>
> it allows my program to launch, and you can navigate the map for a
> few
> seconds, but it results in a segfault in under 30 seconds, every
> time.
> Basically, the map loads, and you can zoom in, and navigate a little
> bit, and then it segfaults.
>
> I'm assuming the segfault is due to mixing gtk2 / gtk3 code in bad
> ways. At this point I tried adding the "pygtk.require('2.0')" line
> again, hoping it would make gtk3 go away, but it didn't help. Same
> old
> problem.
>
> How do I fix this?
>
> Thanks.
from gi.repository import Gtk
Gtk.require_version('2.0')
--
John (J5) Palmieri
Software Engineer
Red Hat, Inc.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]