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 572943 - Missing import os in ggz/client.py
Missing import os in ggz/client.py
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: glchess
2.24.x
Other All
: High critical
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
: 575306 575416 577082 580233 587784 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-02-24 04:36 UTC by rectangular
Modified: 2009-07-05 05:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description rectangular 2009-02-24 04:36:45 UTC
Version: 2.24.3

What were you doing when the application crashed?
trying to connect to network


Distribution: Unknown
Gnome Release: 2.24.3 2009-01-17 (FreeBSD GNOME Project)
BugBuddy Version: 2.24.2

System: FreeBSD 7.1-RELEASE-p1 FreeBSD 7.1-RELEASE-p1 #3: Wed Feb  4 22:55:15 EST 2009     geof@netbook.thelocale.org:/usr/obj/usr/src/sys/GENERIC i386
X Vendor: The X.Org Foundation
X Vendor Release: 10402000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: Mist

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 ---------------------
    self._cont_handler.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 639 in endElement
    self.handler.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 93 in endElement
    self.parser.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 93 in endElement
    self.parser.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 100 in endElement
    method()
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 358 in end_server
    self.decoder.feedback.onConnected()
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/client.py", line 189 in onConnected
    language = os.environ['LANG']
NameError: global name 'os' is not defined
--------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/glchess/gtkui/gtkui.py", line 315, in __readData
    return self.feedback.onReadFileDescriptor(fd)
  File "/usr/local/lib/python2.5/site-packages/glchess/main.py", line 354, in onReadFileDescriptor
    result = handler.read()
  File "/usr/local/lib/python2.5/site-packages/glchess/network.py", line 154, in read
    self.feedback.registerIncomingData(data)
  File "/usr/local/lib/python2.5/site-packages/glchess/ggz/client.py", line 178, in registerIncomingData
    data = self.decoder.feed(data)
  File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 654, in feed
    self.xparser.feed(chunk)
  File "/usr/local/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 315, in end_element
    self._cont_handler.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 639 in endElement
    self.handler.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 93 in endElement
    self.parser.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 93 in endElement
    self.parser.endElement(name)
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 100 in endElement
    method()
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/protocol.py", line 358 in end_server
    self.decoder.feedback.onConnected()
  • File "/usr/local/lib/python2.5/site-packages/glchess/ggz/client.py", line 189 in onConnected
    language = os.environ['LANG']
NameError: global name 'os' is not defined

Comment 1 palfrey 2009-02-24 11:45:26 UTC
(In reply to comment #0)
>   File "/usr/local/lib/python2.5/site-packages/glchess/ggz/client.py", line
> 189, in onConnected
>     language = os.environ['LANG']
> NameError: global name 'os' is not defined

That's a pretty weird one. Given that the first and only time that particular block of code is present (http://svn.gnome.org/viewvc/gnome-games/trunk/glchess/src/lib/ggz/client.py?r1=8386&r2=8387) client.py also has the "import os" line at the top of the code to import the os builtin module.

Is your python install ok? Does the command 'python -c "import os; print dir(os)" ' give you lots of output?
Comment 2 Gianluca Borello 2009-03-14 01:02:12 UTC
*** Bug 575306 has been marked as a duplicate of this bug. ***
Comment 3 Fabio Durán Verdugo 2009-03-15 19:26:24 UTC
*** Bug 575416 has been marked as a duplicate of this bug. ***
Comment 4 Jason Clinton 2009-03-17 18:58:49 UTC
Bug 575416 has a patch.
Comment 5 Robert Ancell 2009-03-19 11:23:46 UTC
Fixed on 2.24 branch:
http://svn.gnome.org/viewvc/gnome-games?view=revision&revision=8868
Comment 6 Robert Ancell 2009-03-19 11:58:09 UTC
This was caused by bug #565402.
Comment 7 Gianluca Borello 2009-03-28 15:54:26 UTC
*** Bug 577082 has been marked as a duplicate of this bug. ***
Comment 8 Gianluca Borello 2009-04-26 09:01:45 UTC
*** Bug 580233 has been marked as a duplicate of this bug. ***
Comment 9 Fabio Durán Verdugo 2009-07-05 05:45:48 UTC
*** Bug 587784 has been marked as a duplicate of this bug. ***