Answers.Body: <p>There were quite a lot of things I needed to do to the pgn files to make sure they imported correctly:</p>
  <ol>
  <li>LINE BREAKS/RETURN: chess.com and chessbase both put linebreaks/returns within their pgn files. I had to remove these. When it is a small pgn file, I just do this by hand. When it is a large file, I paste the pgn into MS Word, and use the find/replace feature and replace ^p (special character for return) with a space &quot; &quot;.</li>
  <li>GLIPHS: If the pgn includes any classical anotated gliphs like !? or =/- or ? or ! then I needed to go through and search for character symbols like &quot;$5&quot; and remove them from the pgn. The longer glyphs were turned into these &quot;$X&quot; characters, while &quot;!&quot; and &quot;?&quot; were kepts as these characters, and I needed to remove them as well for the import to Lichess to work.</li>
  <li>IMPORT IN SECTIONS: To find these errors, the way I trouble shot and searched for a solution to the problem was by importing sections of my pgn (starting at the beginning), and importing a small section with &quot;))))))&quot; at the end (to close all variations in the list of moves). If it worked, I made the selection of moves larger, starting at the beginning, and eventually I would find a section of moves that would break the import. I then manually looked through these moves and tried to find anything that seemed out of place or non-standard pgn moves.</li>
  </ol>
  <p>I hope this is useful to someone.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-12T12:19:17.500Z
Answers.Text: [pgn-extract](https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/) can clean pgn file. Have you tried it?
Answers.UserDisplayName: ferdy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-12T03:53:43.493Z
Answers.LastActivityDate: 2023-02-12T03:53:43.493Z
Answers.UserDisplayName: Nicholas Harrigan
Body: <p>[I'm writing this question so I can answer it for anyone who faces a similar problem in the future]</p>
  <p>I am having trouble importing pgn files of my games from chess.com and from chessbase into a Lichess study.</p>
  <p>I have exported the pgn from chess.com and chessbase (separately), and when I use the import feature on Lichess study it will only import the first move.</p>
  
Tags: <pgn><lichess><chessbase><chess.com>
Title: Problems importing pgn to Lichess from chess.com and/or chessbase
ThreadText: # Problems importing pgn to Lichess from chess.com and/or chessbase
  
  (Asked by: username_0 on 2023-02-12)
  
  [I'm writing this question so I can answer it for anyone who faces a similar problem in the future]
  
  I am having trouble importing pgn files of my games from chess.com and from chessbase into a Lichess study.
  
  I have exported the pgn from chess.com and chessbase (separately), and when I use the import feature on Lichess study it will only import the first move.
  
  **Tags:** pgn, lichess, chessbase, chess.com
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-02-12. Score: 1
  
  There were quite a lot of things I needed to do to the pgn files to make sure they imported correctly:
  
  1. LINE BREAKS/RETURN: chess.com and chessbase both put linebreaks/returns within their pgn files. I had to remove these. When it is a small pgn file, I just do this by hand. When it is a large file, I paste the pgn into MS Word, and use the find/replace feature and replace ^p (special character for return) with a space " ".
  2. GLIPHS: If the pgn includes any classical anotated gliphs like !? or =/- or ? or ! then I needed to go through and search for character symbols like "$5" and remove them from the pgn. The longer glyphs were turned into these "$X" characters, while "!" and "?" were kepts as these characters, and I needed to remove them as well for the import to Lichess to work.
  3. IMPORT IN SECTIONS: To find these errors, the way I trouble shot and searched for a solution to the problem was by importing sections of my pgn (starting at the beginning), and importing a small section with "))))))" at the end (to close all variations in the list of moves). If it worked, I made the selection of moves larger, starting at the beginning, and eventually I would find a section of moves that would break the import. I then manually looked through these moves and tried to find anything that seemed out of place or non-standard pgn moves.
  
  I hope this is useful to someone.
  
  > **Comments:**
  > **username_1**: [pgn-extract](https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/) can clean pgn file. Have you tried it?  
  
  ---
  
  