GNOME Bugzilla – Bug 483556
AssertionError: pygtk.require() must be called before importing gtk
Last modified: 2008-08-14 07:29:02 UTC
Version: 2.20.0.1 What were you doing when the application crashed? Opening it. Distribution: Debian lenny/sid Gnome Release: 2.20.0 2007-09-21 (Debian) BugBuddy Version: 2.20.0 System: Linux 2.6.21-1-686 #1 SMP Sat May 26 16:14:59 UTC 2007 i686 X Vendor: The X.Org Foundation X Vendor Release: 70101000 Selinux: No Accessibility: Disabled GTK+ Theme: Clearlooks Icon Theme: gnome Memory status: size: 0 vsize: 0 resident: 0 share: 0 rss: 0 rss_rlim: 0 CPU usage: start_time: 0 rtime: 0 utime: 0 stime: 0 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 0 ----------- .xsession-errors --------------------- Traceback (most recent call last):
+ Trace 167856
start_game()
import main
import gtkui
from gtkui import GtkUI
pygtk.require('2.0')
assert not sys.modules.has_key('gtk'), \
-------------------------------------------------- Traceback (most recent call last):
*** Bug 484800 has been marked as a duplicate of this bug. ***
Also reported on sf.net 2007-09-13 05:22 : When I try to test glchess the suggested way I get the following exception. itz@unicorn:~/glchess-1.0.6$ PYTHONPATH=lib/ ./glchess *** Using development data files *** Traceback (most recent call last):
+ Trace 169162
import glchess.main
This is on Debian etch, python 2.4, python-gtk2 2.8.6. Ian nobrowser AT gmailSPAN.SPAMcom
*** Bug 486339 has been marked as a duplicate of this bug. ***
*** Bug 487059 has been marked as a duplicate of this bug. ***
I've moved pygtk.require() into the main glchess (src/glchess.in) file so it really is getting called first. Since this issue is not happening for me in Ubuntu Gutsy I'll need someone else to confirm. The change is committed to the gnome-games-2.2.0 branch.
*** Bug 490652 has been marked as a duplicate of this bug. ***
*** Bug 492879 has been marked as a duplicate of this bug. ***
*** Bug 496342 has been marked as a duplicate of this bug. ***
*** Bug 497679 has been marked as a duplicate of this bug. ***
*** Bug 498273 has been marked as a duplicate of this bug. ***
*** Bug 498275 has been marked as a duplicate of this bug. ***
*** Bug 498790 has been marked as a duplicate of this bug. ***
*** Bug 504325 has been marked as a duplicate of this bug. ***
*** Bug 510383 has been marked as a duplicate of this bug. ***
*** Bug 512137 has been marked as a duplicate of this bug. ***
*** Bug 510837 has been marked as a duplicate of this bug. ***
Why call pygtk.require at all? Yes I know about http://faq.pygtk.org/index.py?req=show&file=faq02.004.htp , but for all other libraries used, we seam to rely only on the packagers. And after all, do anybody really use (py)gtk < 2 today?
This change was accidentally undone: http://svn.gnome.org/viewvc/gnome-games/trunk/glchess/src/glchess.in?r1=6889&r2=6894&pathrev=7100
Created attachment 106944 [details] [review] Re-adds the pygtk.require() call
Bug 521154 states this call is required on some systems.
Code freeze break granted and patch committed http://svn.gnome.org/viewvc/gnome-games?view=revision&revision=7500
*** Bug 546042 has been marked as a duplicate of this bug. ***