lichess.org
Donate

Invalid PGN

Hi! I took a page from one of my books in Chessbase format, converted it to pgn and now I'd like to import it in one of my lichess studies. Lichess' tool to import games though doesn't like the pgn file in question. Any advice on how to clean the text in order to be able to put it in a study without losing too much information?
Thx

[Event "FIDE World Cup, Khanty-Mansiysk"]
[Site "?"]
[Date "2005.??.??"]
[Round "?"]
[White "Lautier, J."]
[Black "Carlsen, M."]
[Result "0-1"]
[ECO "E55"]
[EventDate "2005.??.??"]
[Annotator "John Emms"]
[PlyCount "132"]
[SourceTitle "The Nimzo-Indian: MBM"]
[Source "Everyman Chess"]
[SourceDate "2011.11.25"]
[SourceVersion "1"]
[SourceVersionDate "2011.11.25"]
[SourceQuality "1"]

1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.e3 O-O 5.Bd3 d5 6.Nf3 c5 7.O-O dxc4 8.Bxc4
Nbd7
{QUESTION: Why did Carlsen choose to develop the knight to d7? Why
not
c6? ANSWER: A few reasons: 1. 8...Nbd7 marks the beginning of
Carlsen's
queenside development plans. He intends to develop his light-squared
bishop on
the long diagonal with ...b6 and ...Bb7, and on d7 the knight won't
block the
bishop's path. 2. Black will want to exert pressure down the c-file
with ...
Rc8 and/or ...Qc7. If the knight is on d7 it won't block the c-file.
3. The
knight adds support to the c5-pawn, giving Black more options in the
event of
dxc5.}
9.Qe2
{This is White's most popular try against the Parma Variation.
First of all he intends to activate his king's rook on d1. This is
clearly a
tempting square for the rook: it supports the d4-pawn, indirectly
opposes the
black queen and sets up active possibilities in the centre such as
d4-d5, dxc5
and e3-e4.}
9...b6
{Carlsen doesn't waste any time delaying the development of the
bishop.}
10.Rd1
{And Lautier carries out his mini-plan. Alternatives for
White will be discussed in the next game.}
10...cxd4
( {QUESTION: This exchange in
the centre frees White's c1-bishop. Isn't it better, or at least more
flexible,
to keep the central tension with} 10...Bb7 {?} )
( {ANSWER:} 10...Bb7 {is
probably the move Black would like to play, but this allows White to
demonstrate one of the strengths of the Qe2, Rd1 plan:} 11.d5 $1 {.
White's
idea is that after some exchanges on d5, the bishop on b4 will be left
rather
out on a limb, hitting thin air. For example,} 11...exd5
( {the tactical
justification behind White's idea is that} 11...Bxc3 {can be met
by the
zwischenzug} 12.dxe6 $1 {when White regains the piece by force and
has good
chances of emerging with some advantage, e.g.} 12...Ba5 13.exd7
Qc7 14.e4 Nxd7 15.Ng5 {and again Black's dark-squared bishop is
out of the game, L.Polugaevsky-T.
Petrosian, Leningrad 1960} )
12.Nxd5 Nxd5 13.Bxd5 Bxd5 14.Rxd5 {followed by
e3-e4.} )
11.exd4
{Lautier accepts an isolated queen's pawn (IQP) position and
frees the c1-bishop, but the structure is about to change again.}
( {Keeping
the symmetry with} 11.Nxd4 Bb7 {causes Black no real problems and
should lead
to a level position.} 12.--
( {For example,} 12.Bd2 a6 13.Be1 Qe7 14.a3 Bd6 15.f3 b5 16.Ba2
Rac8 {, S.Gligoric-V.Smyslov, Amsterdam 1954.} )
( {Offering a
pawn with} 12.e4 $5 {is sharper, but Black is still fine:} 12...
Qc8 $5
( {if} 12...Bxc3 13.bxc3 Nxe4 {White has the shot} 14.Nxe6 $1
{; however, this is still
very playable for Black after} 14...fxe6 15.Bxe6+ Kh8 16.Rxd7
Qf6 17.Rxb7 Qxe6 {intending} 18.f3 Qc8 {with an unclear
position, as indicated by Golubev} )
13.f3 Ne5 14.Bb3 Bxc3 15.bxc3 Ba6 $1 {with good counterplay,
S.Shankland-I.
Farago, Budapest 2009. This is why Black played 12...Qc8; blunted
by f2-f3 and
e3-e4, Black's light-squared bishop moves to a more active
diagonal.} )
)
11...Bxc3
{QUESTION: Why did Carlsen trade on c3 now? Shouldn't Black wait for
White to play a2-a3? Can he keep this bishop?}
( {ANSWER: Black often does
delay taking on c3 and instead chooses} 11...Bb7 {, but ...Bxc3 is
definitely
part of his plans. If Black delays ...Bxc3 for too long, or tries to
avoid it
completely, he runs the risk of being hit in the centre by d4-d5, as
we have
already seen.} 12.--
( {For example,} 12.Bg5 Rc8 $6 13.d5 $1 {and now} 13...Bxc3
( {or} 13...exd5 14.Nxd5 Bxd5 15.Bxd5 )
14.dxe6 $1 {(this idea again)} 14...Bxf3 15.gxf3 $1 {with Black
struggling in both cases.} )
( {However, Black can – and
should – meet} 12.Bg5 {with} 12...Bxc3 $1 13.bxc3 Qc7
( {or} 13...Rc8 {with
similar play to the main game. QUESTION: So why didn't Carlsen
wait one more
move before exchanging?} )
)
( {ANSWER: I suspect the reason for Carlsen's
decision to take on c3 at this earliest moment was to eliminate
all d4-d5
possibilities. That is, after 11...Bb7 White can play} 12.d5 $5 {
and now:} 12...--
( 12...exd5 13.Nxd5 {is again a bit better for White, e.g.}
13...Re8 14.Qc2 Nxd5 15.Bxd5 Bxd5 16.Rxd5 Qe7
( 16...Rc8 $2 17.Qd1 $1 {leaves Black's knight in
trouble} )
17.Bg5 f6 18.Rad1 Nf8 19.Be3 {and White's pieces are the more
active, N.Sedlak-G.Sax, Zalaegerszeg 2010.} )
( 12...Bxc3 $1 13.dxe6 $1 Bxf3 $1 14.gxf3 $1
( {if} 14.Qxf3 {then} 14...Ne5 $1 15.exf7+ Kh8 16.Rxd8
Nxf3+ 17.gxf3 Raxd8 18.bxc3 {with an equal position, e.g.}
18...Rd7 19.Ba3 Rfxf7 20.Bxf7 Rxf7 {when White's extra
pawn is counterbalanced by his wreck of a structure, L.
Portisch-J.Donner, Hamburg 1965} )
14...fxe6 15.bxc3 Qc7 16.Ba3 $5
( {after} 16.Bxe6+ Kh8 17.Be3 Nc5 {Black again enjoys
decent compensation in view of
White's ruined pawns} )
16...Nc5 {with a complex and roughly equal position, L.
Aronian-S.Karjakin, Bilbao 2009. It seems that 12 d5 isn't
quite as effective
here as it is in some positions. So in summary, 11...Bb7 is
certainly playable
as long as Black is intending to take on c3 in most cases
anyway and is ready
to meet the complications of 12 d5.} )
)
)
12.bxc3 Qc7
{Let's assess the imbalances of the position after
12...Qc7: 1. Both sides are almost fully developed, and their pieces
are
harmoniously placed. 2. White enjoys a bit more space, but Black
certainly
isn't cramped. The trade of one set of minor pieces has helped Black
in this
respect. 3. White has the bishop pair in a fairly open position, but
Black's
remaining bishop will be on a very good diagonal. 4. Black has no
structural
weaknesses. 5. White possesses what's known as an isolated pawn couple
(the
c3- and d4-pawns). The final point is a key positional feature of the
position.
Depending on specifics, the isolated pawn couple could prove to be
either a
strength or a weakness. The pawn couple controls key central squares,
offers
White space and might become a dynamic weapon advancing in the centre.
On the
other hand, the pawns are static weaknesses. The c3-pawn is backward,
but when
it advances to c4 (creating "hanging pawns") both pawns are vulnerable
to some
extent. As a rule of thumb, the more pieces that are exchanged, the
more
prominent the static weakness of this pawn couple becomes. So in
general Black
should be happy with piece exchanges, as long as they don't involve
concessions.}
( 12...Bb7 {is also
played here, but given that Black normally follows up with ...Qc7 a
transposition is likely.} )
13.Bb2
{QUESTION: This bishop looks very passive on b2. Why did
Lautier move it to this square? ANSWER: The simple reason is that
White wants
to move his bishop from c4, which at the moment is vulnerable to
attack and
also blocking the c-pawn, so first he defends the c3-pawn to avoid
...Qxc3.
White then intends to play c3-c4 more or less straight away, after
which the
bishop on b2 becomes more useful. Not only does it protect the
d4-pawn, it
also exerts indirect pressure on e5 and the bishop's power down the
long
diagonal may be released at the right time by a d4-d5 advance.After
that long discussion on Black's general strategy and
positional aims, let's return to the game and the position after
Lautier's 13
Bb2.}
( {Still, 13
Bb2 is hardly the only option for White. Another is} 13.Bd2 {. For
example,} 13...Bb7 14.Bd3 Rfe8 {(lining up the possibility of ...e5,
which White's next move
prevents)} 15.Re1 Rac8 16.a4 $5 {. QUESTION: What's the purpose of 16
a4?
ANSWER: White is preparing to play a4-a5 at some moment, the benefits
of which
are twofold: 1. White eliminates one of his pawn weaknesses; and 2.
Black is
left with a pawn weakness himself, whether he allows an exchange on b6
or
takes on a5. The latter case, usually avoided by Black, results in
White's
c-pawn becoming passed. QUESTION: How should Black react? ANSWER:
There's not
a great deal Black can do to directly prevent a4-a5, but he can focus
on his
own positional goals. As mentioned earlier, Black's position tends to
improve
with piece exchanges, because these reduce the dynamism in White's
position
and emphasize the static weaknesses. EXERCISE: Look at the position
after 16
a4 and try to find two different plans for Black seeking to force a
favourable
exchange of minor pieces.Black could just play} 16...Bxf3 {here, but
that would
be a mistake because it accepts too many concessions: Black trades his
strong
bishop, leaves White with two bishops versus two knights and is left
with many
light-squared weaknesses. ANSWER: Black can play either 16...Bd5 or
16...Nd5.
Let's take a look at these ideas in turn:}
( {The ...Bd5 plan: Black's plan
after} 16...Bd5 {is to play ...Bc4! forcing an exchange of
light-squared
bishops. Even though Black's bishop is a good piece, he is usually
very happy
to trade it for its counterpart which is probably even stronger
given that it
forms one half of a bishop pair. More specifically, if Black can
exchange
bishops it gives him the opportunity to dominate and occupy the
light squares
in the centre with moves such as ...Qc4 and ...Nd5, piling up on
the c3-pawn
and seizing the advantage. In a few games White has been
sufficiently wary of
this promising plan and has changed the dynamics of the position
with the sharp} 17.Ne5 $1 {(preventing ...Bc4 for the moment)}
17...Nxe5 18.dxe5 Nd7 19.Qh5 {. The game has moved on with Ne5.
White still suffers from static weaknesses
(we can add e5 to the list now), but at the moment Black's
pressing concern is
how to deal with White's initiative on the kingside. This is a
type of
situation Black could easily face in the Parma Variation, though
he will often
try to avoid it. EXERCISE (multiple choice): How should Black deal
with the
attack on h7? The options are: a) 19...Nf8; b) 19...g6; c)
19...h6; d) 19...f5.} 19...--
( {ANSWER: The first thing to note is that} 19...h6 $2 {,
inviting the
obvious sacrifice} 20.Bxh6 $1 {, is usually very risky and
here} 20...gxh6 21.Qxh6 Nf8 22.Re3 Ng6 23.h4 {gives White a
very strong attack.} )
( 19...g6 {leaves
Black's kingside full of dark-square holes which are very
difficult to defend.
T.Hillarp Persson-C.Ionescu, Batumi 1999, continued} 20.Qh4
Bc4
( {if} 20...Nxe5 {then} 21.Bf4 {is an awkward pin} )
21.Bc2 Qb8 $2 22.Bg5 Bd5 $2 {, and here White could have won
immediately with} 23.Qh6 $1 {(threatening Bf6)} 23...Kh8 24.
Re3 Rg8 25.Qxh7+ $1 Kxh7 26.Rh3+ Kg7 27.Bh6+ Kh8 28.Bf8# {.
Black did defend poorly in this game, but 19...g6 doesn't
really look very
appealing to me.} )
( 19...Nf8 {is the move Black often relies on in this type
of position because it allows him to defend h7 without
incurring any
weaknesses. This move looks better than both 19...h6 and
19...g6, although with} 20.Re3 $1 {intending Rh3 or Rg3 White
can keep his initiative going on the
kingside.} )
( 19...f5 $1 {might well be the best move. After} 20.exf6 Nxf6
21.Qh4 {Black has accepted a weakness of his own (the e6-pawn)
but crucially he
is able to "defend actively", for want of a better phrase.
After} 21...Bc4
( 21...Qd8 $5 )
22.Bc2 Qf7 23.Bg5 Bd5 24.Re3
( 24.Bxf6 gxf6 25.Re3 {might be more
testing} )
24...Rc4 $1 {Black had good counterplay in R.Henley-L.Evans,
New
York 1977. In conclusion, Black's position is not that easy to
play after 19
Qh5, but 19...Nf8 and particularly 19...f5 offer the best
chances.} )
)
( {The ...Nd5 plan: This move is a vital resource for Black in the
Parma
Variation. In this particular position, with} 16...Nd5 $5 {Black
threatens to
win a pawn with ...Nxc3 or to force a favourable trade of one of
White's
bishops with ...Nf4.} 17.--
( {Here} 17.c4 Nf4 $1 18.Bxf4 Qxf4 {is just the
type of position Black is aiming for. The exchange of minor
pieces has dented
White's ambitions and left only the worry of how to adequately
protect his
hanging pawns.} )
( {White can try to mix things up with} 17.Ne5 Nxe5 18.dxe5 {
but Black gains quick and strong counterplay down the central
files here; for
example,} 18...Red8
( {or even just} 18...Nxc3 )
19.c4 Qc6 $1 {, and if} 20.cxd5 Qxd5 21.Be4 {then} 21...Qxe4
22.Qxe4 Bxe4 {leaves Black a pawn ahead.} )
( 17.Qe4 {also prevents both threats. Black should reply with
either} 17...Nf8
( {or} 17...N5f6 18.Qh4 e5 $1 {with a decent position,} )
( {but he should avoid} 17...N7f6 18.Qh4 $1 Nxc3 $2 19.
Rec1 {. In conclusion, out of the two approaches, in
this particularly line I feel that 16...Nd5 is safer and
more promising than
16...Bd5.} )
)
)
)
13...Bb7 14.Bd3
{Lautier removes the bishop from the vulnerable
c4-square and prepares to play c3-c4.Let's get back to the game and
the
position after 14 Bd3:}
( {After} 14.Rac1 $6 {, for example,
White must be willing to allow his kingside pawns to be smashed by}
14...Bxf3 {.}
( {In fact after 14 Rac1 White should be more worried by} 14...Ng4
$1 {. This is
a key tactical idea to remember, as it works very well in certain
situations.
If} 15.h3 $2 {Black can win a pawn with} 15...Bxf3 16.Qxf3 Nxf2 $1
{.} )
)
( {Against} 14.Bb3 {Black could consider} 14...Qf4 $5 {followed by
...Rac8 – the queen is
quite well placed on f4 and provides useful nuisance value.}
( {QUESTION: What
about the} 14...Ng4 {idea in answer to 14 Bb3? ANSWER: Sometimes
the ...Ng4
idea is ineffective because White can simply invite the check on
h2, and this
is one of those occasions. After} 15.h3 $1 Bxf3 16.Qxf3 Qh2+ 17.
Kf1 Ngf6 {Black can't do anything with his queen and he has
achieved very little in
giving up bishop for knight. In general, ...Ng4 ideas are more
likely to work
if the bishop is still on c4; or if the rook is still on f1, when
...Qh2 is
checkmate rather than just check.} )
)
14...Nd5 $1
{A strong move by Carlsen. He actively
seeks an exchange with ...Nf4, after which he would stand at least
equal.Returning to the game after Carlsen's 14...Nd5!:}
( {QUESTION: How about} 14...Ng4 {in this position? ANSWER: It's even
worse here,
due to the tactic} 15.Bxh7+ $1 Kxh7 16.Ng5+ {.} )
( {As a general point, Black
has to be careful not to become too passive. The following game serves
as a
warning as to what might happen if he does, and a reminder of White's
attacking chances:} 14...Rfe8 15.c4 $1 {(it's too late for ...Nd5!)}
15...Rac8 16.Rac1 Nf8 {(...Nd7-f8-g6, eyeing f4 again, is a typical
manoeuvre, but White
responds energetically...)} 17.Ne5 $1 Ng6 18.Qe3 Nxe5 19.dxe5 Qc6 20.
Qh3 $1 Ne4
( 20...Nh5 $1 {looks better, as} 21.Bxh7+ Kxh7 22.Qxh5+ Kg8 {is
far from
clear} )
21.Re1 Ng5 22.Qg4 h6 23.Re3 {(now White's attack runs very smoothly)}
23...Rc7 24.h4 Nh7 25.Rg3 g6 26.h5 g5 27.f4 Qc5+ 28.Kh2 Qe7 29.Ba3 $1
f5 30.exf6 Qxf6 31.Rf1 Rg7 32.fxg5 Qxg5 33.Bg6 $1 Qe5 34.Bf7+ Kh8 35.
Qxg7+ {and Black was forced to resign in S.Yuferov-V.Zilberstein, USSR
1969.} )
15.Qe4 $1
{Lautier defends
against both ...Nf4 and ...Nxc3 for the moment by threatening mate on
h7.}
( {If} 15.c4 $6 Nf4 16.Qe3 Nxd3 17.Qxd3 Bxf3 18.gxf3 Rac8 {Black's
position is
looking very good.} )
15...N7f6 16.Qe5
{Lautier feels obliged to offer an
exchange of queens.}
( {An earlier game, B.Melander-K.Tikkanen, correspondence
1986, went} 16.Qh4 Nf4 $1
( {again Black must avoid} 16...Nxc3 17.Rdc1 )
17.Bf1 Bxf3 $1 {(this exchange is obviously more appealing now that it
smashes
White's kingside pawn structure, and even more so because Black can
immediately take advantage of this)} 18.gxf3 N6h5 $1 19.Re1 f5 $1 20.
Bc1 Rf6 {and out of seemingly nowhere Black had a strong attack. The
game continued} 21.Bxf4 Nxf4 22.Kh1 Ng6 23.Qg3 Qxc3 24.Rac1 Qxd4 {and
Black won.} )
16...Rac8 17.c4 Nf4 $1 18.Bf1 Bxf3
{Carlsen chooses the same unbalancing exchange.
Unlike the previous note, the queens are exchanged and Black doesn't
build up
a quick attack on the kingside. However, Carlsen still manages to
achieve
significant play with his knights.}
19.gxf3 Rfd8 20.Qxc7 Rxc7 21.a4 $1
{EXERCISE: Find a way to get the f6-knight more involved in the
action.(Hint:
Black's first move might not be a knight move.) 21 a4! is a good move
by
Lautier. White must seek action on the queenside to counterbalance
Black's
play on the other wing.ANSWER:}
21...h6 $1
{Planning ...Nh7, and then either ...
Ng5 or ...Nf8-g6-h4, in either case helping Black's attack on the
kingside.}
22.a5 Nh7 23.axb6 axb6 24.Ra3 Nf8 25.Rda1 Rcc8
{Preventing Ra8. The battle
is hotting up. White will likely win the b6-pawn, but once the knight
on f8 is
fully activated Black's knight pair will cause chaos.}
26.Rb3 N8g6 $1 27.Rxb6 Nh4 28.Ra3 Nf5 29.c5 e5 $1
{Carlsen presents Lautier, who was perhaps in
time trouble, with a difficult decision to make.}
30.Ba6 $2
{EXERCISE: How
should Black respond to the attack on his c8-rook?ANSWER:}
( {Lautier must have been
worried about Black's activity after} 30.dxe5 Rxc5 {but this is what
he had
to try.} )
30...Nxd4 $1
{By ignoring it. Black has his own, more
serious threats, i.e. checkmate!}
31.Rd6
( {If} 31.Bxc8 Nde2+ 32.Kf1 Rd1# )
( {or} 31.Bxd4 Rxd4 32.Bxc8 Rd1# {.} )
31...Rxd6 32.cxd6 Rd8 $1 33.Kf1 Rxd6
{Carlsen has won the d6-pawn by force, and with his knight so dominant
he
enjoys a decisive advantage. The game lasts quite a bit longer and
the
remaining moves are worth playing through, but the final result is
never
really in any doubt.}
34.Bd3 g5 35.Be4 Kg7 36.Ra1 Rb6 37.Ba3 f5 38.Ba8 Kf6 39.Bc5 Rb5 40.Bd6 Ke6
41.Bf8 Rb8 42.Bc5 Rb2 43.Re1 Kf6 44.Rd1 h5 45.Ke1 Re2+ 46.Kf1 Rb2 47.Ke1
Re2+ 48.Kf1 Rc2 49.Bb6 Kg6 50.Bb7 Rb2 51.Bxd4 exd4 52.Ba6 Kf6 53.Bc4 Ke5
54.Re1+ Kd6 55.Rd1 Kc5 56.Ba6 Kd5 57.Ke1 Ra2 58.Bb5 Kc5 59.Bd7 d3 60.Bxf5
Kd4 61.Rb1 Re2+ 62.Kf1 d2 63.Bc2 Re5 64.Rd1 Kc3 65.Be4 Rxe4 66.fxe4 Kc2
{This was a real heavyweight scrap between two
world-class grandmasters. Carlsen's 14...Nd5! was a key move which
ensured
that Black enjoyed a full share of the chances, and he then outplayed
his
opponent from a dynamically balanced position.}
0-1
I would presume this is because of the null moves, i.e. "--", which are not supported.
Scid vs PC can filter out text and variants and then after saving the clean pgn, try to upload it and make a study.
Copy paste your text back in where the moves are made.
You will have to manually playout your variations too. @ReFosc
Found the game on lichess. Now you just have to put it in a study and copy paste your text from the Scid comment section and manual play your variations. Then a final server analysis ...

You can export from the Scid and then ctcl+insert to copy what is exported. It will look like this ...

1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.e3 O-O 5.Bd3 d5 6.Nf3 c5 7.O-O dxc4 8.Bxc4
Nbd7
{QUESTION: Why did Carlsen choose to develop the knight to d7? Why not
c6? ANSWER: A few reasons: 1. 8...Nbd7 marks the beginning of
Carlsen's queenside development plans. He intends to develop his
light-squared bishop on the long diagonal with ...b6 and ...Bb7, and
on d7 the knight won't block the bishop's path. 2. Black will want to
exert pressure down the c-file with ... Rc8 and/or ...Qc7. If the
knight is on d7 it won't block the c-file. 3. The knight adds support
to the c5-pawn, giving Black more options in the event of dxc5.}
9.Qe2
{This is White's most popular try against the Parma Variation. First
of all he intends to activate his king's rook on d1. This is clearly a
tempting square for the rook: it supports the d4-pawn, indirectly
opposes the black queen and sets up active possibilities in the centre
such as d4-d5, dxc5 and e3-e4.}
9...b6
{Carlsen doesn't waste any time delaying the development of the
bishop.}

Thank you very much for your help @Toscani @boilingFrog @bufferunderrun . Since I'm extra lazy (and I have many other games I'd like to import) I was hoping to be able to find the specific syntax error not to have to insert all the variations manually. But for now my tries were unsuccesseful. I tried to remove '--' and the parenthesis ']' '}' from the PGN file but that doesn't seem to be the issue. With Scid I tried removing comments and/or variations and the problem seems to hide somewhere in the sidelines.
It's the null moves. You can't just remove them, you can try replacing them with actual moves, but it can get tricky down the line. So the best option is to comment out the whole variation where you have the null move, with {}.
OMG @bufferunderrun it finally worked! I just put a bunch of {} around the null moves as you suggested and I managed to import the all thing very quickly. Thanks I'm very grateful
Of course in the very next game there is a new issue -.-
After putting the null moves inside brackets the import tool gives me this error message:

Cannot parse pgn: [79.9]: expected: )

( 12.Bd2 Nc6 13.Qa4

This topic has been archived and can no longer be replied to.