fowode / pychess

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

FICS crash after game ended #832

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. played an unrated game on fics
2. my partner lost with time
3. pychess crashed

Traceback (most recent call last):
  File "/home/tamas/pychess/sidepanel/scorePanel.py", line 129, in plot_selected
    board = self.boardview.model.boards[selected]
IndexError: list index out of range
  File "/home/tamas/pychess/pychess", line 136, in <module>
    import pychess.Main
  File "/home/tamas/pychess/lib/pychess/Main.py", line 24, in <module>
    from pychess.widgets import enginesDialog
  File "/home/tamas/pychess/lib/pychess/widgets/enginesDialog.py", line 10, in <module>
    from pychess.widgets import newGameDialog
  File "/home/tamas/pychess/lib/pychess/widgets/newGameDialog.py", line 29, in <module>
    from pychess.widgets import ionest
  File "/home/tamas/pychess/lib/pychess/widgets/ionest.py", line 6, in <module>
    from pychess.Savers import * # This needs an import all not to break autoloading
  File "/home/tamas/pychess/lib/pychess/Savers/png.py", line 12, in <module>
    from pychess.widgets import gamewidget
  File "/home/tamas/pychess/lib/pychess/widgets/gamewidget.py", line 4, in <module>
    from BoardControl import BoardControl
  File "/home/tamas/pychess/lib/pychess/widgets/BoardControl.py", line 17, in <module>
    from PromotionDialog import PromotionDialog
  File "/home/tamas/pychess/lib/pychess/widgets/PromotionDialog.py", line 12, in <module>
    uistuff.cacheGladefile("promotion.glade")
  File "/home/tamas/pychess/lib/pychess/System/uistuff.py", line 455, in cacheGladefile
    pool.start(readit)
  File "/home/tamas/pychess/lib/pychess/ic/FICSConnection.py", line 283, in run
    self.client.parse()
  File "/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 211, in parse
    answer = self.test_prediction(p, line)
  File "/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 220, in test_prediction
    answer = prediction.handle(line.line)
  File "/home/tamas/pychess/lib/pychess/ic/VerboseTelnet.py", line 49, in handle
    self.callback(match)
  File "/home/tamas/pychess/lib/pychess/ic/managers/BoardManager.py", line 354,in onStyle12
    game = self.connection.games.get_game_by_gameno(gameno)
  File "/home/tamas/pychess/lib/pychess/ic/FICSObjects.py", line 921, in get_game_by_gameno
    return self.games_by_gameno[gameno]
<type 'exceptions.KeyError'> 289

Original issue reported on code.google.com by gbtami on 29 Jan 2014 at 10:35

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mattgatto on 30 Jan 2014 at 7:01

GoogleCodeExporter commented 9 years ago
Revision: ceb04cf64b81 (Fix for observe and follow commands started from FICS 
console) was a quick and dirty hack to solve Issue #747: Add finger and follow 
buttons to players tab in FICS lounge. In Revision: abd5c9b0d30d (Sped-up 
FICSGames a little) line
return self.games_by_gameno.get(gameno)
changed back to
return self.games_by_gameno[gameno]

This is the reason of KeyError. Maybe my "follow from console" hack should be 
replaced with some better solution. I just don't know how :(

Original comment by gbtami on 30 Jan 2014 at 12:02

GoogleCodeExporter commented 9 years ago

Original comment by mattgatto on 9 Feb 2014 at 9:24

GoogleCodeExporter commented 9 years ago
Fixed in revision d7f13af261c5

Original comment by mattgatto on 9 Feb 2014 at 12:19