pychess crash with OperationalError and RuntimeError

Bug #356553 reported by siafok
This bug report is a duplicate of:  Bug #365730: pychess can't be started. Edit Remove
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
pychess (Ubuntu)
New
Undecided
Unassigned

Bug Description

pychess
Version: 0.8.2-1

Ubuntu Jaunty
uname -a: Linux [...] 2.6.28-11-generic #40-Ubuntu SMP Fri Apr 3 17:39:51 UTC 2009 i686 GNU/Linux

..@...: ~$ pychess
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/dist-packages/pychess/System/tsqlite.py", line 34, in run
    con = sqlite.connect(self.path)
OperationalError: unable to open database file

/usr/lib/python2.6/dist-packages/pychess/Players/engineNest.py:3: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os, md5, imp

(pychess:6187): libglade-WARNING **: could not find glade file '/usr/lib/python2.6/glade/tipoftheday.glade'
Traceback (most recent call last):
  File "/usr/games/pychess", line 87, in <module>
    import pychess.Main
  File "/usr/lib/python2.6/dist-packages/pychess/Main.py", line 20, in <module>
    from pychess.widgets import tipOfTheDay
  File "/usr/lib/python2.6/dist-packages/pychess/widgets/tipOfTheDay.py", line 7, in <module>
    widgets = GladeWidgets("tipoftheday.glade")
  File "/usr/lib/python2.6/dist-packages/pychess/System/uistuff.py", line 198, in __init__
    self.widgets = gtk.glade.XML(addDataPrefix("glade/%s" % filename))
RuntimeError: could not create GladeXML object

siafok (wlar-siafok-wp)
description: updated
Revision history for this message
Öyvind Sæther (oyvinds) wrote :

I checked my Gentoo box and there "tipoftheday.glade" is located in:

games-board/pychess-0.8.2 (/usr/share/games/pychess/glade/tipoftheday.glade)

Then I checked this Ubuntu 9.04RC box and found that all the PyChess files are on the box in:

/usr/share/games/pychess/glade/

..but none of these files are found (not just tipoftheday.glade, that is just the first file tried).

SOLUTION (not recommended or supported, probably, but it _works_):

# mkdir /usr/lib/python2.6/glade/
# cp -v /usr/share/games/pychess/glade/* /usr/lib/python2.6/glade/

..and now I get to play PyChess again. I have very little experience with .deb packages, my only Ubuntu use is that I put it on giveaway-to-n00b boxes. I assume it is just some guile path issue of some sort which makes it look for pychess in the wrong place. Above cp "fix" works and lets me play, the real solution is to adjust some file to look in the right path.

Revision history for this message
grofaty (grofaty) wrote :

xiando,
I have tried your instruction on Ubuntu 9.04 final release (installing pychess from repository: sudo apt-get install pychess) and PyChess started up, but reported several messages:
=========
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/dist-packages/pychess/System/tsqlite.py", line 34, in run
    con = sqlite.connect(self.path)
OperationalError: unable to open database file

/usr/lib/python2.6/dist-packages/pychess/Players/engineNest.py:3: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os, md5, imp
==========
Then when I clicked on "Start Game" button to play chess PyChess returned the following errors into terminal:

=========
 File "/usr/local/bin/pychess", line 46, in <module>
    pychess.Main.run(sys.argv[1:])
  File "/usr/lib/python2.6/dist-packages/pychess/Main.py", line 490, in run
    gtk.main()
  File "/usr/lib/python2.6/dist-packages/pychess/widgets/Background.py", line 281, in startClicked
    self.difCombo.active)
  File "/usr/lib/python2.6/dist-packages/pychess/Main.py", line 384, in on_newGameTasker_started
    ionest.generalStart(gamemodel, player0tup, player1tup)
  File "/usr/lib/python2.6/dist-packages/pychess/widgets/ionest.py", line 54, in generalStart
    worker.execute()
  File "/usr/lib/python2.6/dist-packages/pychess/System/GtkWorker.py", line 156, in execute
    self.start()
  File "/usr/lib/python2.6/dist-packages/pychess/System/ThreadPool.py", line 103, in start
    pool.start(self.run)
  File "/usr/lib/python2.6/dist-packages/pychess/System/GtkWorker.py", line 159, in run
    self.result = self.func(self)
  File "/usr/lib/python2.6/dist-packages/pychess/widgets/ionest.py", line 33, in <lambda>
    workfunc(w, gamemodel, player0tup, player1tup, loaddata))
  File "/usr/lib/python2.6/dist-packages/pychess/widgets/ionest.py", line 57, in workfunc
    gmwidg = gamewidget.GameWidget(gamemodel)
  File "/usr/lib/python2.6/dist-packages/pychess/widgets/gamewidget.py", line 285, in __init__
    panels = [f[:-3] for f in os.listdir(path) if f.endswith(pf)]
<type 'exceptions.OSError'> [Errno 2] No such file or directory: '/usr/lib/python2.6/sidepanel'
============

Revision history for this message
Lee Harr (missive) wrote :

Try running pychess like this:

python2.5 /usr/games/pychess

Revision history for this message
Lee Harr (missive) wrote :

> python2.5 /usr/games/pychess

Actually... this only partially works.

The PyChess opponent never responds, but the game works fine using
the GNU Chess opponent.

I do not get any errors when trying the PyChess opponent, it just never
makes a move, whether playing black or white.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.