GM Andreikin vs GM Vachier-Lagrave battle in Death Match 29 LIVE on Chess.com/TV - ALL MEMBERS! Click here to watch!
Upgrade to Chess.com Premium!

Trouble Inserting PGN File onto Game Analysis


  • 3 years ago · Quote · #1

    quadrewple

    I'm trying to get a game onto here for help analyzing and it's giving me this error message when I paste the PGN file into chess.com's interface.

    "improper pgn file.  TypeError:  Cannot call method 'charAT' of undefined"

    The text is here: 

    [Event "Live Chess"]

    [Site "Chess.com"]

    [Date "2011.09.22"]

    [Round "?"]

    [White "quadrewple"]

    [Black "Knightt17"]

    [Result "1-0"]

    [BlackElo "2000"]

    [ECO "C50"]

    [Opening "Giuoco Pianissimo"]

    [Variation "Italian Four Knights, 5...d6 6.Be3"]

    [WhiteElo "2400"]

    [Termination "normal"]

    [PlyCount "163"]

    [WhiteType "human"]

    [BlackType "program"]

     

    1. e4 e5 2. Nc3 Nc6 3. Nf3 Nf6 4. Bc4 Bc5 5. O-O d6 6. d3 Bg4 7. h3 Bxf3

    {I'm very glad he didn't play Bh5 and keep that annoying pin on.} 8. Qxf3

    O-O 9. Be3 {I usually try to trade off bishops if someone has theirs on the

    c file.} Bxe3 10. fxe3 Nb4 11. Bb3 (11. a3 Nxc2 12. Rac1 Nxe3 13. Qxe3) 11.

    .. c5 12. a3 Nc6 13. Nd5 b6 14. Rf2 a5 15. Raf1 a4 16. Nxf6+ Qxf6 17. Qxf6

    gxf6 18. Bd5 Rac8 19. Rxf6 Ne7 {I didn't spend very long on this move,

    perhaps I should have explored the option of Rxd6. At this point my

    long-term strategy is just to trade down, though with the condition that my

    remaining piece is better than his. My queenside pawn structure is very

    solid and won't need any piece protection once the position is simplified.}

    20. Bxf7+ Kg7 {At this point I was concerned about him playing this

    variation if I didn't move the f6 rook so I did Rf3 to get onto the 3rd

    rank earlier with Rg3+ if useful later on.} 21. R6f3 (21. Kh2 Ng8 22. R6f3)

    21. .. Ng6 {I didn't want to trade yet with Bxg6 because all my pieces are

    better than his. My bishop has a full a2-g8 diagonal, the rooks are

    doubled, and after trades here, my guess is that it will be a rook vs rook

    endgame where our rooks are about equal. It would still be a won endgame

    but it seemed like an unnecessary harder path to take than just keeping the

    bishop on it's best diagonal.} 22. Be6 (22. Bxg6 Rxf3 23. Rxf3 hxg6 {As you

    can see, my rook has no way to get into black's territory.}) 22. .. Rcd8

    23. Rf7+ {I want him to take on f7 so I can get my other rook onto the 7th

    rank and eventually play Rb7 winning a pawn.} Kh6 {I spent alot of time

    thinking here. My assessment was that all I had to do was to get my king in

    front of the kingside pawns and push the pawns. Probably a premature idea,

    considering that black still has two rooks, but it seeming wasn't a

    terrible idea either.} 24. Kh2 Rde8 25. Bd5 Rg8 26. Rb7 {Double attack on

    rook and undefendable pawn} Ref8 27. Rff7 Rxf7 28. Bxf7 Rg7 {Here I

    realized that I took with the wrong piece.} 29. Bd5 Rxb7 30. Bxb7 Ne7 31.

    Kg3 {The plan was to advance my king as far up the board as black would let

    me. Basically I wanted my king to stay closer to e4 and d5 than the

    opponent's king so that at some point I could play Bd5 offering the piece

    exchange which gets me a passed pawn.} Kg5 32. h4+ Kf6 33. Kg4 Kg6 34. c4

    {At this point, I'm pretty much waiting for him to move his knight so I can

    play Bb6 which wins the a pawn.} h5+ 35. Kf3 Ng8 36. g4 Nf6 {I considered

    g5 and even Bc8 here. I thought for a while but couldn't see any advantages

    to those movesover what I played.} 37. gxh5+ Kxh5 {Here I was quite a bit

    more uncertain of how to proceed than I was just a few moves earlier. I

    ended up thinking a very long time, while neglecting to protect the h pawn.

    It looks as if the h pawn would fall eventually no matter what though. I

    also forgot about Bc6.} 38. Bc8 Kxh4 39. Be6 Nh5 40. Bd7 Ng3 41. Bxa4 Nf1

    42. Bd1 Nd2+ 43. Kg2 {I noticed that his knight was trapped right after

    moving here!} Kg5 44. Kf2 Kh4 45. Ke2 Nb1 46. Bc2 Nxa3 47. bxa3 Kg4 {The

    rest is just a very easy endgame.} 48. Ba4 Kg5 49. Bc6 Kf6 50. Kd2 Ke7 51.

    Kc3 Kd8 52. Kb3 Kc7 53. Bd5 Kb8 54. Ka4 Ka7 55. Kb5 Kb8 56. a4 Ka7 57. a5

    bxa5 58. Kxa5 Kb8 59. Kb6 Kc8 60. Kc6 Kb8 61. Kxd6 Kc8 62. Kxc5 Kc7 63. d4

    exd4 64. exd4 Kd7 65. e5 Ke7 66. Kc6 Ke8 67. Bf3 Ke7 68. d5 Ke8 69. Bh5+

    Ke7 70. Kc7 Kf8 71. e6 Ke7 72. Bf7 Kf6 73. Kb8 Ke7 74. c5 Kf6 75. c6 Ke7

    76. c7 Kd6 77. c8=Q Kxd5 78. e7+ Kd6 79. Qe6+ Kc5 80. Qe5+ Kc6 81. e8=Q+

    Kb6 82. Q5b5# 1-0

    Help solving this would be greatly appreciated!
  • 3 years ago · Quote · #2

    PrawnEatsPrawn

    [Event "Live Chess"]

    [Site "Chess.com"]

    [Date "2011.09.22"]

    [Round "?"]

    [White "quadrewple"]

    [Black "Knightt17"]

    [Result "1-0"]

    [BlackElo "2000"]

    [ECO "C50"]

    [Opening "Giuoco Pianissimo"]

    [Variation "Italian Four Knights, 5...d6 6.Be3"]

    [WhiteElo "2400"]

    [Termination "normal"]

    [PlyCount "163"]

    [WhiteType "human"]

    [BlackType "program"]

     

    1. e4 e5 2. Nc3 Nc6 3. Nf3 Nf6 4. Bc4 Bc5 5. O-O d6 6. d3 Bg4 7. h3 Bxf3

    {I'm very glad he didn't play Bh5 and keep that annoying pin on.} 8. Qxf3

    O-O 9. Be3 {I usually try to trade off bishops if someone has theirs on the

    c file.} Bxe3 10. fxe3 Nb4 11. Bb3 (11. a3 Nxc2 12. Rac1 Nxe3 13. Qxe3) c5 12. a3 Nc6 13. Nd5 b6 14. Rf2 a5 15. Raf1 a4 16. Nxf6+ Qxf6 17. Qxf6

    gxf6 18. Bd5 Rac8 19. Rxf6 Ne7 {I didn't spend very long on this move,

    perhaps I should have explored the option of Rxd6. At this point my

    long-term strategy is just to trade down, though with the condition that my

    remaining piece is better than his. My queenside pawn structure is very

    solid and won't need any piece protection once the position is simplified.}

    20. Bxf7+ Kg7 {At this point I was concerned about him playing this

    variation if I didn't move the f6 rook so I did Rf3 to get onto the 3rd

    rank earlier with Rg3+ if useful later on.} 21. R6f3 (21. Kh2 Ng8 22. R6f3)

    Ng6 {I didn't want to trade yet with Bxg6 because all my pieces are

    better than his. My bishop has a full a2-g8 diagonal, the rooks are

    doubled, and after trades here, my guess is that it will be a rook vs rook

    endgame where our rooks are about equal. It would still be a won endgame

    but it seemed like an unnecessary harder path to take than just keeping the

    bishop on it's best diagonal.} 22. Be6 (22. Bxg6 Rxf3 23. Rxf3 hxg6 {As you

    can see, my rook has no way to get into black's territory.}) Rcd8

    23. Rf7+ {I want him to take on f7 so I can get my other rook onto the 7th

    rank and eventually play Rb7 winning a pawn.} Kh6 {I spent alot of time

    thinking here. My assessment was that all I had to do was to get my king in

    front of the kingside pawns and push the pawns. Probably a premature idea,

    considering that black still has two rooks, but it seeming wasn't a

    terrible idea either.} 24. Kh2 Rde8 25. Bd5 Rg8 26. Rb7 {Double attack on

    rook and undefendable pawn} Ref8 27. Rff7 Rxf7 28. Bxf7 Rg7 {Here I

    realized that I took with the wrong piece.} 29. Bd5 Rxb7 30. Bxb7 Ne7 31.

    Kg3 {The plan was to advance my king as far up the board as black would let

    me. Basically I wanted my king to stay closer to e4 and d5 than the

    opponent's king so that at some point I could play Bd5 offering the piece

    exchange which gets me a passed pawn.} Kg5 32. h4+ Kf6 33. Kg4 Kg6 34. c4

    {At this point, I'm pretty much waiting for him to move his knight so I can

    play Bb6 which wins the a pawn.} h5+ 35. Kf3 Ng8 36. g4 Nf6 {I considered

    g5 and even Bc8 here. I thought for a while but couldn't see any advantages

    to those movesover what I played.} 37. gxh5+ Kxh5 {Here I was quite a bit

    more uncertain of how to proceed than I was just a few moves earlier. I

    ended up thinking a very long time, while neglecting to protect the h pawn.

    It looks as if the h pawn would fall eventually no matter what though. I

    also forgot about Bc6.} 38. Bc8 Kxh4 39. Be6 Nh5 40. Bd7 Ng3 41. Bxa4 Nf1

    42. Bd1 Nd2+ 43. Kg2 {I noticed that his knight was trapped right after

    moving here!} Kg5 44. Kf2 Kh4 45. Ke2 Nb1 46. Bc2 Nxa3 47. bxa3 Kg4 {The

    rest is just a very easy endgame.} 48. Ba4 Kg5 49. Bc6 Kf6 50. Kd2 Ke7 51.

    Kc3 Kd8 52. Kb3 Kc7 53. Bd5 Kb8 54. Ka4 Ka7 55. Kb5 Kb8 56. a4 Ka7 57. a5

    bxa5 58. Kxa5 Kb8 59. Kb6 Kc8 60. Kc6 Kb8 61. Kxd6 Kc8 62. Kxc5 Kc7 63. d4

    exd4 64. exd4 Kd7 65. e5 Ke7 66. Kc6 Ke8 67. Bf3 Ke7 68. d5 Ke8 69. Bh5+

    Ke7 70. Kc7 Kf8 71. e6 Ke7 72. Bf7 Kf6 73. Kb8 Ke7 74. c5 Kf6 75. c6 Ke7

    76. c7 Kd6 77. c8=Q Kxd5 78. e7+ Kd6 79. Qe6+ Kc5 80. Qe5+ Kc6 81. e8=Q+

    Kb6 82. Q5b5# 1-0

  • 3 years ago · Quote · #3

    PrawnEatsPrawn

    Okay, figured it out. Remove the "{Move number}.." entries from the PGN file.

  • 3 years ago · Quote · #4

    philidor_position

    Edit: Prawn beat me to it. Damn.

  • 3 years ago · Quote · #5

    PrawnEatsPrawn

    The above PGN has been "repaired" and should now be correct. Examine how it varies from yours.
  • 3 years ago · Quote · #6

    PrawnEatsPrawn

    philidor_position wrote:

    Edit: Prawn beat me to it. Damn.


     

    Ha ha! I've had rooperi beating me to the punch, all week.

  • 3 years ago · Quote · #7

    quadrewple

    I'm not sure what you mean by that.  The only difference I see is in spacing.

  • 3 years ago · Quote · #8

    PrawnEatsPrawn

    quadrewple wrote:

    I'm not sure what you mean by that.  The only difference I see is in spacing.


     

    Look more closely, rigour is paramount in these constructions.

     

    Where White had made a move, then you commented, then you resumed the game with "{Move number}.. {Black move} ", I removed the "{Move number}.." part.

     

    For example:

     

    Yours:

     

     

    (Please excuse my "mouse-writing")

     

    Leave out the resumption part, the PGN reader knows what move number it is and who is to move. Including this "extra" detail confuses the PGN reader and creates an invalid file message.

     

    I think I found two or three of these "resumption errors" in your PGN.

     

    The spacing has nothing to do with anything, I think I must have centred the text by accident.

  • 3 years ago · Quote · #9

    quadrewple

    PrawnEatsPrawn wrote:
    Leave out the resumption part, the PGN reader knows what move number it is and who is to move. Including this "extra" detail confuses the PGN reader and creates an invalid file message.

    Okay, I appreciate the advice.  What's confusing to me is that I didn't manually add anything to the file or do anything out of the ordinary and I've posted a couple of games before never having this problem.


Back to Top

Post your reply: