lichess.org
Donate

Cannot import games from pgn

@Veelsoeps said in #8:
> I have the same problem since today. Both with Safari on iOS and with Firefox 99.0.1 on macOS. I cannot import any PGN games from another chess website.
Did you try using chrome, edge & opera?
I have tried in Safari, Firefox and Chrome. And my pgn gets "destroyed". Here you can see the pgn after importing. Before it was just a normal pgn as usual:

[Event "Live Chess - chess"]
[Site "lichess.org/cLRih0mG"]
[Date "2022.04.15"]
[White "?"]
[Black "?"]
[Result "*"]
[UTCDate "2022.04.15"]
[UTCTime "17:19:34"]
[WhiteElo "?"]
[BlackElo "?"]
[Variant "Standard"]
[TimeControl "-"]
[ECO "?"]
[Opening "?"]
[Termination "Unterminated"]
[Annotator "lichess.org"]

*
@ShivanshKhare said in #11:
> Did you try using chrome, edge & opera?

I've tried with a few different browsers, same problem. The moves get deleted.
@DrEckleburg said in #12:
> I have tried in Safari, Firefox and Chrome. And my pgn gets "destroyed". Here you can see the pgn after importing. Before it was just a normal pgn as usual:
>
> [Event "Live Chess - chess"]
> [Site "
> "]
> [Date "2022.04.15"]
> [White "?"]
> [Black "?"]
> [Result "*"]
> [UTCDate "2022.04.15"]
> [UTCTime "17:19:34"]
> [WhiteElo "?"]
> [BlackElo "?"]
> [Variant "Standard"]
> [TimeControl "-"]
> [ECO "?"]
> [Opening "?"]
> [Termination "Unterminated"]
> [Annotator "lichess.org"]
>
> *

Yes, I get exactly the same.
Exact same here, I tried deleting most of the metadata from this game to try & identify the bug to no avail :

[White "-"]
[Black "Moi"]
[Result "1-0"]
[Termination "White won by checkmate"]

1. e4 c6 2. d4 d5 3. e5 Bf5 4. Nc3 e6 5. f4 Nd7 6. a3 c5 7. Nb5 a6 8. Nc3 cxd4
9. Qxd4 Bc5 10. Qd2 Nb6 11. Nf3 Nc4 12. Bxc4 dxc4 13. Qe2 b5 14. Ne4 Bb6 15.
Nd6+ Ke7 16. Nxf5+ exf5 17. Bd2 a5 18. Be3 Nh6 19. Qf2 Bxe3 20. Qxe3 Re8 21.
Qc5+ Ke6 22. Rd1 Qb8 23. Ng5# 1-0
to import games with this new bug you have to remove all the data in brackets where only the moves themselves are left. Then you have to make sure there moves are separated by a white space and not any weird newline characters
@Andromeda3 said in #16:
> to import games with this new bug you have to remove all the data in brackets where only the moves themselves are left. Then you have to make sure there moves are separated by a white space and not any weird newline characters

This does work but it is an extra inconvenient step to process the pgns and it's nice to have the metadata loaded. Has the parsing code been recently changed?
Yes. Me too. I can't "Import Game" neither by copying the PGN from the clipboard nor by uploading the .pgn file I've never had problems with this functionality, but now it doesn't work
Another temporary workaround is to only import the 'game' portion of the PGN with all newlines removed. e.g. if you have this pgn

[Date "2022.04.16"]
[Round "?"]
[White "abc"]
[Black "def4"]
[Result "0-1"]
[TimeControl "600"]
[Termination "def won by resignation"]

1. d4 d5 2. Bf4 c5 3. c3 Nc6 4. e3 Nf6 5. Bb5 e6 6. Bxc6+ bxc6 7. Nf3 Bd6 8. Ne5
cxd4 9. exd4 c5 10. Nxf7 Kxf7 11. Bxd6 Qxd6 12. Qf3 cxd4 13. cxd4 Qb4+ 14. Nd2
Qxd4 15. Rd1 Qe5+ 16. Kf1 Rf8 17. Re1 Qd6 18. Re2 Ba6 19. g3 Bxe2+ 20. Qxe2 Kg8
21. Nf3 Rac8 22. Kg2 0-1

then import this:

1. d4 d5 2. Bf4 c5 3. c3 Nc6 4. e3 Nf6 5. Bb5 e6 6. Bxc6+ bxc6 7. Nf3 Bd6 8. Ne5 cxd4 9. exd4 c5 10. Nxf7 Kxf7 11. Bxd6 Qxd6 12. Qf3 cxd4 13. cxd4 Qb4+ 14. Nd2 Qxd4 15. Rd1 Qe5+ 16. Kf1 Rf8 17. Re1 Qd6 18. Re2 Ba6 19. g3 Bxe2+ 20. Qxe2 Kg8 21. Nf3 Rac8 22. Kg2 0-1

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