After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 521154 - glchess requires import pygtk; pygtk.require('2.0') before import gtk.glade
glchess requires import pygtk; pygtk.require('2.0') before import gtk.glade
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: glchess
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-08 08:31 UTC by paul
Modified: 2008-03-10 12:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
small patch (418 bytes, patch)
2008-03-08 20:19 UTC, paul
rejected Details | Review

Description paul 2008-03-08 08:31:18 UTC
Traceback (most recent call last):
  • File "/opt/local/bin/glchess", line 57 in <module>
    start_game()
  • File "/opt/local/lib/python2.5//site-packages/glchess/glchess.py", line 20 in start_game
    import main
  • File "/opt/local/lib/python2.5//site-packages/glchess/main.py", line 17 in <module>
    import config
  • File "/opt/local/lib/python2.5//site-packages/glchess/config.py", line 1 in <module>
    from defaults import *
  • File "/opt/local/lib/python2.5//site-packages/glchess/defaults.py", line 49 in <module>
    import gtk.glade
ImportError: No module named gtk.glade
[6968 refs]
Comment 1 Thomas Andersen 2008-03-08 11:07:37 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 470038 ***
Comment 2 paul 2008-03-08 20:10:55 UTC
actually, not a duplicate
pygtk and gnome-python are installed and available with the right environment variable set
on some platforms, pygtk needs to be explicitly imported before any of the modules under it

% python
Python 2.5.2a0 (release25-maint:59940M, Jan 13 2008, 15:47:59) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk.glade
Traceback (most recent call last):
  • File "<stdin>", line 1 in <module>
ImportError: No module named gtk.glade
[14035 refs]
>>> import pygtk
[18816 refs]
>>> pygtk.require('2.0')
[18817 refs]
>>> import gtk.glade
/opt/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py:72: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
[84595 refs]
>>> 



Comment 3 paul 2008-03-08 20:19:32 UTC
Created attachment 106867 [details] [review]
small patch
Comment 4 Robert Ancell 2008-03-10 03:33:38 UTC
This call used to be included, it was accidentally undone when moving (see bug 483556)
Comment 5 Robert Ancell 2008-03-10 03:47:43 UTC
Requesting code-freeze break for this change.
Comment 6 Robert Ancell 2008-03-10 03:49:10 UTC
We need to use the patch from bug 483556 as gtk can be imported before defaults.py has been imported.
Comment 7 Robert Ancell 2008-03-10 12:24:28 UTC
Code freeze granted and patch committed
http://svn.gnome.org/viewvc/gnome-games?view=revision&revision=7500