{"action":"closed","issue":{"url":"https://api.github.com/repos/pychess/pychess/issues/547","labels_url":"https://api.github.com/repos/pychess/pychess/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/pychess/pychess/issues/547/comments","events_url":"https://api.github.com/repos/pychess/pychess/issues/547/events","html_url":"https://github.com/pychess/pychess/issues/547","id":56463184,"number":547,"title":"UCIEngine PlayerIsDead exception after a piece promotion","user":{"login":"pychess","id":10670522,"avatar_url":"https://avatars.githubusercontent.com/u/10670522?v=3","gravatar_id":"","url":"https://api.github.com/users/pychess","html_url":"https://github.com/pychess","followers_url":"https://api.github.com/users/pychess/followers","following_url":"https://api.github.com/users/pychess/following{/other_user}","gists_url":"https://api.github.com/users/pychess/gists{/gist_id}","starred_url":"https://api.github.com/users/pychess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pychess/subscriptions","organizations_url":"https://api.github.com/users/pychess/orgs","repos_url":"https://api.github.com/users/pychess/repos","events_url":"https://api.github.com/users/pychess/events{/privacy}","received_events_url":"https://api.github.com/users/pychess/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pychess/pychess/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-04T00:42:45Z","updated_at":"2015-02-04T00:44:01Z","closed_at":"2015-02-04T00:44:01Z","body":"Original [issue 547](https://code.google.com/p/pychess/issues/detail?id=547) reported by [mattgatto](https://code.google.com/u/mattgatto/) 2010-04-05\n\n**What steps will reproduce the problem?**\n1. Load the attached pos.fen and play White against Fruit or Stockfish as Black\n2. play f6f7 ... f7f8q\n3. wait for engine's reply\n\n**What is the expected output? What do you see instead?**\nExcerpt, but full log is attached as well:\n04:07:11 Default Error: A Player died: player=Fruit 2.1 error=Traceback (most recent call last):\n  File \"/home/gatto/code/svn/pychess-bugfix/lib/pychess/Utils/GameModel.py\", line 396, in run\n    self.boards[-2])\n  File \"/home/gatto/code/svn/pychess-bugfix/lib/pychess/Players/UCIEngine.py\", line 184, in makeMove\n    raise PlayerIsDead\nPlayerIsDead\n\nThis happens because UCIEngine.\\_startPonder doesn't convert self.pondermove to AN\nbefore sending it in the 'position' command string to the engine:\n\n    def \\_startPonder (self):\n        print >> self.engine, \"position fen\", self.board.asFen(), \\\n                                \"moves\", self.pondermove\n        print >> self.engine, \"go ponder wtime\", self.wtime, \\\n            \"btime\", self.btime, \"winc\", self.incr, \"binc\", self.incr\n\nAlso, when the move is sent in the 'position ... <pondermove>' string, it has\nto match the format of the move string sent from the engine in the\n'bestmove ... pondermove ...' string or both stockfish and fruit will either\ncrash or seems to misinterperet the move and then send an illegal move in reply\ncausing a PlayerIsDead exception to be raised. The UCI protocol page\nhttp://wbec-ridderkerk.nl/html/UCIProtocol.html says promotions should be in the\n\"short\" AN form:\n\nMove format:\n------------\n\nThe move format is in long algebraic notation.\nA nullmove from the Engine to the GUI should be send as 0000.\nExamples:  e2e4, e7e5, e1g1 (white short castling), e7e8q (for promotion)\n\n\nThe attached patch fixes the problem (but doesn't include the necessary changes to\nUCIEngine.\\_startPonder() which are included in the patch of changes attached to the\nUCIEngine synchronization problems issue."}}