I got this error while importing pgn
I got this error while importing pgn
Hello,
I ve got this error while importing pgn:
Fatal error: Uncaught exception 'Exception' with message 'Fen: 8/pp1q1p1Q/n2P1kp1/2p1R1N1/5P2/P1P5/6PP/6K1 b - - 0 10 color: black notation: Qh8 Rank: File: 0, ' in /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/FenParser0x88.php:1327 Stack trace: #0 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/FenParser0x88.php(1169): FenParser0x88->getFromAndToByNotation('Qh8+') #1 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(50): FenParser0x88->getParsed(Array) #2 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(34): GameParser->parseAMove(Array) #3 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(57): GameParser->parseMoves(Array) #4 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(47): GameParser->parseVariations(Array) #5 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php( in /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/FenParser0x88.php on line 1327
I ve got this error while importing pgn:
Fatal error: Uncaught exception 'Exception' with message 'Fen: 8/pp1q1p1Q/n2P1kp1/2p1R1N1/5P2/P1P5/6PP/6K1 b - - 0 10 color: black notation: Qh8 Rank: File: 0, ' in /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/FenParser0x88.php:1327 Stack trace: #0 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/FenParser0x88.php(1169): FenParser0x88->getFromAndToByNotation('Qh8+') #1 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(50): FenParser0x88->getParsed(Array) #2 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(34): GameParser->parseAMove(Array) #3 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(57): GameParser->parseMoves(Array) #4 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php(47): GameParser->parseVariations(Array) #5 /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/GameParser.php( in /home/mobilderslik/eders.org/wp-content/plugins/dhtml_chess/api/php/parser/FenParser0x88.php on line 1327
Re: I got this error while importing pgn
Send me the pgn(you have my email) and I will take a look at it. It's a problem parsing one of the games.
Re: I got this error while importing pgn
It is art_attack pgn from the demo folder
Re: I got this error while importing pgn
Ah ok I will fix that tonight.
Some pgns are buggy. I will modify the code for the pgn to JSON parser so that it gracefully ignores games it can't understand. I will of course also try to fix the parser if there's a bug in it.
Some pgns are buggy. I will modify the code for the pgn to JSON parser so that it gracefully ignores games it can't understand. I will of course also try to fix the parser if there's a bug in it.
Re: I got this error while importing pgn
The plugin has been updated with a temporary fix for this problem.
It occurred because of NULL moves in the pgn, i.e. things like:
9... -- 10. Re5 (notice the --)
I have not yet implemented support for NULL moves, but I have added it to my Trello boards of upcoming tasks.
The temporary bugfix is to ignore games the parser can't understand, i.e it imports the rest of the games without any errors. It's a better user experience than throwing a FATAL error.
It occurred because of NULL moves in the pgn, i.e. things like:
9... -- 10. Re5 (notice the --)
I have not yet implemented support for NULL moves, but I have added it to my Trello boards of upcoming tasks.
The temporary bugfix is to ignore games the parser can't understand, i.e it imports the rest of the games without any errors. It's a better user experience than throwing a FATAL error.
-
- Posts: 57
- Joined: Wed Mar 08, 2017 8:17 am
Re: I got this error while importing pgn
Hi alf,
Whenever I import pgn, it missed the first game.
Then I try to remove the database by swiping it, and go to Archived Database to delete it and reload another time (same file), and now, the game in database are enough. Is this a bug, or just me have that problem?
Whenever I import pgn, it missed the first game.
Then I try to remove the database by swiping it, and go to Archived Database to delete it and reload another time (same file), and now, the game in database are enough. Is this a bug, or just me have that problem?
Re: I got this error while importing pgn
If you're missing a game, there could be a problem with your pgn(or the DHTML Chess parser).
If you post the first few games of the pgn here, I will try it out with the parser to see if there are any problems.
When you import games into DHTML Chess, there is a parser which analyses the game and stores the game in the database in a computer-readable format(JSON). There has been some issues in the past where the parser could not understand the PGN. I have fixed most of these issues, but there may be other problems.
If you post the first few games of the pgn here, I will try it out with the parser to see if there are any problems.
When you import games into DHTML Chess, there is a parser which analyses the game and stores the game in the database in a computer-readable format(JSON). There has been some issues in the past where the parser could not understand the PGN. I have fixed most of these issues, but there may be other problems.
-
- Posts: 57
- Joined: Wed Mar 08, 2017 8:17 am
Re: I got this error while importing pgn
I tried once again, to see if the problem would occur or not. And it's just the same. The game editor just show 29, instead of 30 exercises, and it missed the first one.
http://pastebin.com/ZuQxhjfh
It's not a critical problem. However, I think that in our Game Editor, you can add a function to rearrange the order of database's game, so that we can manually enter the game, the position and then rearrange it to the order that fit best. I.e: "+" button to move a selected game up, and "-" button to move it down.
Thank you Alf,
Warm regards,
http://pastebin.com/ZuQxhjfh
It's not a critical problem. However, I think that in our Game Editor, you can add a function to rearrange the order of database's game, so that we can manually enter the game, the position and then rearrange it to the order that fit best. I.e: "+" button to move a selected game up, and "-" button to move it down.
Thank you Alf,
Warm regards,
Re: I got this error while importing pgn
Thanks for providing a link to the pgn.
I have tested the pgn now, and cannot find any problems with it. I get 30 games when I import the pgn. I'm also getting 30 games parsed when I test it directly with the PGN to JSON PHP parser.
I have tested the pgn now, and cannot find any problems with it. I get 30 games when I import the pgn. I'm also getting 30 games parsed when I test it directly with the PGN to JSON PHP parser.
-
- Posts: 57
- Joined: Wed Mar 08, 2017 8:17 am
Re: I got this error while importing pgn
Hi alf,
Thank you for taking a look. Maybe it's because of my web server.
Thank you for taking a look. Maybe it's because of my web server.
Who is online
Users browsing this forum: No registered users and 10 guests