importsfromgooglecode / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

PGN read/write broken in 0.5.2 #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It should be easy to fix however.

Original issue reported on code.google.com by lobais on 6 Nov 2006 at 3:11

GoogleCodeExporter commented 9 years ago
Yes, reading a pgn file is broken for the moment. The reason is propably the 
changes
in the history object.

Saving however works.

Original comment by thijsver...@gmail.com on 6 Nov 2006 at 6:31

GoogleCodeExporter commented 9 years ago
Oeps, the read is also broken. I'm looking at it now

Original comment by thijsver...@gmail.com on 6 Nov 2006 at 7:21

GoogleCodeExporter commented 9 years ago
I think I fixed saving and It can load a lot of pgn files.
Can someone check if it works now?

P.S.: Loading a pgn file gives a nice demo of the animations ;-)

Original comment by thijsver...@gmail.com on 7 Nov 2006 at 8:16

GoogleCodeExporter commented 9 years ago
Nice work :)
Pgn loading works for me, but I get this traceback when it has loaded the file, 
and
tries to load it into the engines. Seams that the epd saver needs work too.
Traceback (most recent call last):
  File "./PyChess.py", line 353, in on_load_game1_activate
    window.analyzer.setBoard(game.history)
  File "/home/thomas/Programmering/python/skak/svn/Players/CECP.py", line 89, in setBoard
    self.runWhenReady(self.proto.setBoard, fen)
  File "/home/thomas/Programmering/python/skak/svn/Players/CECP.py", line 72, in
runWhenReady
    method(*args)
  File "/home/thomas/Programmering/python/skak/svn/Players/CECP.py", line 488, in
setBoard
    epd.save(io, history)
  File "/home/thomas/Programmering/python/skak/svn/Savers/epd.py", line 13, in save
    history = game.history
AttributeError: 'History' object has no attribute 'history'

Original comment by lobais on 7 Nov 2006 at 9:01

GoogleCodeExporter commented 9 years ago

Original comment by lobais on 15 Nov 2006 at 6:49