Problems with gtk3

Asked by Giovanni Santini

hi mate i'm running gnome 3 with latest gtk and pygtk... the fact is that GTKs loaded are 3 and not 2, so new ubuntu tweak (0.6) crush! can i solve this? you'll fix it?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Tweak Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ding Zhou (tualatrix) said :
#1

Please tell me your distribution, thank you!

Revision history for this message
Giovanni Santini (itachi-san) said :
#2

ubuntu natty narwhal (correct? xD) 11.04 with gnome 3 ppas, included staging one... need ppas? or some other infos? :) thanks mate!

Revision history for this message
Ding Zhou (tualatrix) said :
#3

Could you give me the crash message when you run Ubuntu Tweak? Thanks.

Revision history for this message
Giovanni Santini (itachi-san) said :
#4

/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:47: RuntimeWarning: You have imported the Gtk 2.0 module. Because Gtk 2.0 was not designed for use with introspection some of the interfaces and API will fail. As such this is not supported by the pygobject development team and we encourage you to port your app to Gtk 3 or greater. PyGTK is the recomended python module to use with Gtk 2.0
  warnings.warn(warn_msg, RuntimeWarning)
Traceback (most recent call last):
  File "/usr/bin/ubuntu-tweak", line 53, in <module>
    from ubuntutweak.main import UbuntuTweakApp, UbuntuTweakWindow, show_splash
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/main.py", line 31, in <module>
    from ubuntutweak.gui.dialogs import ErrorDialog
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/gui/dialogs.py", line 21, in <module>
    from gi.repository import GObject, Gtk, Gdk, Pango, Vte
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 76, in load_module
    dynamic_module._load()
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 222, in _load
    version)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 90, in __init__
    repository.require(namespace, version)
gi.RepositoryError: Requiring namespace 'Gtk' version '3.0', but '2.0' is already loaded
<-- this was before last update
and now this one -->
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:47: RuntimeWarning: You have imported the Gtk 2.0 module. Because Gtk 2.0 was not designed for use with introspection some of the interfaces and API will fail. As such this is not supported by the pygobject development team and we encourage you to port your app to Gtk 3 or greater. PyGTK is the recomended python module to use with Gtk 2.0
  warnings.warn(warn_msg, RuntimeWarning)
Traceback (most recent call last):
  File "/usr/bin/ubuntu-tweak", line 53, in <module>
    from ubuntutweak.main import UbuntuTweakApp, UbuntuTweakWindow, show_splash
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/main.py", line 24, in <module>
    from ubuntutweak import modules
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/modules/__init__.py", line 10, in <module>
    from gi.repository import GObject, Gtk, Pango, Gdk
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 76, in load_module
    dynamic_module._load()
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 224, in _load
    overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 296, in <module>
    SELECTION_PRIMARY = Gdk.atom_intern('PRIMARY', True)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 105, in __getattr__
    self.__name__, name))
AttributeError: 'gi.repository.Gdk' object has no attribute 'atom_intern'

where did you learn python? maybe i could help in learning that :) i'd like something exhaustive but not long as the official guide...

Revision history for this message
Ding Zhou (tualatrix) said :
#5

OK, don't worry, the official 0.6 will fix this problem.

By the way, I learn python by reading some books, and start with hacking some source code.

Try to read this guide: http://www.swaroopch.com/notes/Python_en:Table_of_Contents

It's not so long as the official guide.

Can you help with this problem?

Provide an answer of your own, or ask Giovanni Santini for more information if necessary.

To post a message you must log in.