This usually happens when there are some discrepancies in the PGN file, especially when the fullmove number in the FEN is 0 instead of 1.
Fullmove number in FEN
The last field in a FEN (Forsyth–Edwards Notation) is “Fullmove number” and it usually starts at 1, and is incremented after Black’s move. So for the 4th move, the fullmove number would be 4.
Screenshot of the wikipedia page (link)
To check if this is the discrepancy in the PGN file, open the PGN file in a text editor (Notepad, TextEdit, Vim, etc.). Now check the fullmove number field in the FENs:
As we can see, the fullmove number is 0 (instead of 1) in these FENs.
Replacing fullmove number 0 with 1
The error can be resolved by updating these 0s with 1s in the PGN file. And you can edit all these FENs in one shot. To do that, go to “Edit” and then select “Replace“:
Now, enter the values you want to replace. That is, we want to replace all “0 0” with “0 1” as shown below:
After clicking “Replace All“, you will notice that all the FENs are updated, i.e. all fullmove numbers with 0 are replaced with 1:
Save this updated PGN file and upload it to your database. Now you will be able to view the games (and load the PGN in your Classroom reference) without encountering the unexpected error: