Closed sohrabtowfighi closed 6 years ago
I get the StopIteration error when running against the following pgn. See line:
165 return next(sq for sq, pt in pieces.items() if pt == piece and indicator in sq and (check_line(sq, to) or check_diagonal(sq, to)))
pgn file:
1.e4 e5 2.Qh5 { C20: King's Pawn Opening: Wayward Queen Attack } 2...d6 3.Bc4 Nh6 { (-0.42 → +0.42) Inaccuracy. A better move was 3... g6. } 4.Qf3 { (+0.50 → 0.00) Inaccuracy. A better move was 4. h3. } 4...Bg4 5.Qg3 Be7 6.d4 { (+0.66 → +0.14) Inaccuracy. A better move was 6. h3. } 6...Bh4 7.Qb3 { (0.00 → -0.86) Inaccuracy. A better move was 7. Qd3. } 7...exd4 { (-0.67 → +1.04) Mistake. The best move was 7... Nc6. } 8.Bxh6 Qd7 { (+1.12 → +6.87) Blunder. The best move was 8... gxh6. } 9.Bxg7 Rg8 10.Bxd4 { (+7.13 → +4.75) Inaccuracy. A better move was 10. Qxb7. } 10...Rf8 11.Bb5 { (+7.55 → +5.42) Inaccuracy. A better move was 11. Qxb7. } 11...c6 12.Bd3 c5 13.Bg7 { (+5.42 → +4.00) Inaccuracy. A better move was 13. Be3. } 13...Rg8 14.Bb5 Nc6 15.Bh6 Be6 16.Qc3 Ke7 17.Bxc6 Qxc6 18.Nf3 { (+4.10 → +1.55) Blunder. The best move was 18. Qf3. } 18...Bf6 19.Qd2 { (+1.31 → -1.34) Blunder. The best move was 19. e5. } 19...Qxe4+ 20.Be3 { (-0.89 → -3.03) Mistake. The best move was 20. Qe2. } 20...Bxb2 21.O-O { (-2.95 → -11.76) Mistake. The best move was 21. Nc3. } 21...Bxa1 { (-13.00 → -2.40) Blunder. The best move was 21... Rxg2+. } 22.Bg5+ Bf6 23.Bxf6+ Kxf6 24.Re1 { (-2.65 → -8.42) Mistake. The best move was 24. Qc3+. } 24...Qc6 { (-8.49 → -1.26) Blunder. The best move was 24... Rxg2+. } 25.Qf4+ Ke7 26.Qh4+ Ke8 { (-3.07 → -2.08) Inaccuracy. A better move was 26... Kd7. } 27.Qxh7 Kd7 28.Ng5 { (-2.66 → -6.85) Mistake. The best move was 28. Nbd2. } 28...Rxg5 29.Nc3 { (-7.10 → ♚ Mate in 1) Mistake. The best move was 29. g3. } 29...Ke7 { (♚ Mate in 1 → -6.03) Mistake. The best move was 29... Qxg2#. } 30.Ne4 Re5 31.Qh4+ Kd7 32.Nf6+ Kc7 33.Rxe5 dxe5 34.Nh7 Qd5 35.g3 Qxa2 { (-12.71 → -7.27) Mistake. The best move was 35... Qd1+. } 36.Qe7+ Kb6 37.Qd6+ Kb5 38.Qxe5 Qxc2 39.Ng5 Bd7 40.Nxf7 Bh3 41.Nd6+ Kc6 42.Qe4+ Qxe4 43.Nxe4 Re8 44.Ng5 { (-12.48 → ♚ Mate in 1) Mistake. The best move was 44. f3. } 44...Re1# 0-1
Thanks!
Thanks for reporting. It is fixed with latest commit.
I get the StopIteration error when running against the following pgn. See line:
165 return next(sq for sq, pt in pieces.items() if pt == piece and indicator in sq and (check_line(sq, to) or check_diagonal(sq, to)))
pgn file:
1.e4 e5 2.Qh5 { C20: King's Pawn Opening: Wayward Queen Attack } 2...d6 3.Bc4 Nh6 { (-0.42 → +0.42) Inaccuracy. A better move was 3... g6. } 4.Qf3 { (+0.50 → 0.00) Inaccuracy. A better move was 4. h3. } 4...Bg4 5.Qg3 Be7 6.d4 { (+0.66 → +0.14) Inaccuracy. A better move was 6. h3. } 6...Bh4 7.Qb3 { (0.00 → -0.86) Inaccuracy. A better move was 7. Qd3. } 7...exd4 { (-0.67 → +1.04) Mistake. The best move was 7... Nc6. } 8.Bxh6 Qd7 { (+1.12 → +6.87) Blunder. The best move was 8... gxh6. } 9.Bxg7 Rg8 10.Bxd4 { (+7.13 → +4.75) Inaccuracy. A better move was 10. Qxb7. } 10...Rf8 11.Bb5 { (+7.55 → +5.42) Inaccuracy. A better move was 11. Qxb7. } 11...c6 12.Bd3 c5 13.Bg7 { (+5.42 → +4.00) Inaccuracy. A better move was 13. Be3. } 13...Rg8 14.Bb5 Nc6 15.Bh6 Be6 16.Qc3 Ke7 17.Bxc6 Qxc6 18.Nf3 { (+4.10 → +1.55) Blunder. The best move was 18. Qf3. } 18...Bf6 19.Qd2 { (+1.31 → -1.34) Blunder. The best move was 19. e5. } 19...Qxe4+ 20.Be3 { (-0.89 → -3.03) Mistake. The best move was 20. Qe2. } 20...Bxb2 21.O-O { (-2.95 → -11.76) Mistake. The best move was 21. Nc3. } 21...Bxa1 { (-13.00 → -2.40) Blunder. The best move was 21... Rxg2+. } 22.Bg5+ Bf6 23.Bxf6+ Kxf6 24.Re1 { (-2.65 → -8.42) Mistake. The best move was 24. Qc3+. } 24...Qc6 { (-8.49 → -1.26) Blunder. The best move was 24... Rxg2+. } 25.Qf4+ Ke7 26.Qh4+ Ke8 { (-3.07 → -2.08) Inaccuracy. A better move was 26... Kd7. } 27.Qxh7 Kd7 28.Ng5 { (-2.66 → -6.85) Mistake. The best move was 28. Nbd2. } 28...Rxg5 29.Nc3 { (-7.10 → ♚ Mate in 1) Mistake. The best move was 29. g3. } 29...Ke7 { (♚ Mate in 1 → -6.03) Mistake. The best move was 29... Qxg2#. } 30.Ne4 Re5 31.Qh4+ Kd7 32.Nf6+ Kc7 33.Rxe5 dxe5 34.Nh7 Qd5 35.g3 Qxa2 { (-12.71 → -7.27) Mistake. The best move was 35... Qd1+. } 36.Qe7+ Kb6 37.Qd6+ Kb5 38.Qxe5 Qxc2 39.Ng5 Bd7 40.Nxf7 Bh3 41.Nd6+ Kc6 42.Qe4+ Qxe4 43.Nxe4 Re8 44.Ng5 { (-12.48 → ♚ Mate in 1) Mistake. The best move was 44. f3. } 44...Re1# 0-1
Thanks!