Promotion without = in PGN not recognized
0Slmpnv0 opened this issue · comments
Describe the bug
I have tried to add to a database some games from a tournament. As I counted, there are 721 game
with open("outp.pgn", 'r', encoding='utf-8') as f: # dont look at the name of the file. I have renamed it
text = f.read()
print(text.count('Event'))
Maybe it's not the best way, but anyway, the returned value was 721.
And I see, that db contains only 618 games
Reproduction
- Go to database
- Add new
- Local
- Select the file
- Convert
Platform and versions
I use ubuntu 23 and en-croissant version 0.10.0
Stack trace
~/chess/en-croissant_0.10.0_amd64.AppImage
/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so: undefined symbol: g_task_set_static_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
[2024-06-05][17:07:32][INFO][en_croissant] Setting up application
[2024-06-05][17:07:32][INFO][en_croissant] Checking for required directories
[2024-06-05][17:07:32][INFO][en_croissant] Checking for required files
/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so: undefined symbol: g_task_set_static_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so: undefined symbol: g_task_set_static_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
[2024-06-05][17:07:33][INFO][webview] React app started successfully
/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so: undefined symbol: g_task_set_static_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so
/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so: undefined symbol: g_task_set_static_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so: undefined symbol: g_task_set_static_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so
** (en-croissant:161803): WARNING **: 20:07:57.390: atk-bridge: get_device_events_reply: unknown signature
I have tried to split a big file in smaller pieces, but it still doesn't work. Now i have 15 files. 14 with 50 games and one with 21. I am adding the first file, and program says, that there are 47 games! The local database feature doesn't work properly with this tiny amount of games, that makes it useless :(
I have splitted it to 10 games per file. It have broken on the second one. 19 games instead of 20...
Opening with file tab works correct 721 game. But I can't interact with it like with database :|
It has nothing to do with the number of games. There's probably some issue with some of the games PGN. It would help if you could send a game that is not being converted.
This game was not converted out of ten from the file
[Event "Первенство РФ 2024 года по шахматам среди девочек до 9 лет (2016-2019 гг.р.)"]
[Site "Кострома"]
[Date "2024.05.24"]
[Round "1.17"]
[White "Мишенина, Мира"]
[Black "Уложенко, Виктория"]
[Result "1-0"]
[ECO "C01"]
[WhiteElo "0"]
[BlackElo "0"]
[Annotator ""]
[Source ""]
[Remark ""]1.e4 e6 2.d4 d5 3.exd5 exd5 4.c4 Nf6 5.Nc3 Bb4 6.Qb3 Bxc3+ 7.Qxc3
O-O 8.Be2 Re8 9.Nf3 Ne4 10.Qc2 dxc4 11.Bxc4 Ng3+ 12.Kd1 Nxh1
13.Be3 Bg4 14.Be2 Bxf3 15.Bxf3 Nc6 16.Qc4 Qd7 17.d5 Ne5 18.Qf4
Nxf3 19.Qxf3 Red8 20.Ke2 Qb5+ 21.Ke1 Qxd5 22.Qxd5 Rxd5 23.Ke2
Re8 24.Rxh1 Red8 25.Rc1 c6 26.a3 a5 27.Bb6 Rd2+ 28.Ke1 a4 29.Bxd8
Rxd8 30.Rc4 Re8+ 31.Kd2 Ra8 32.Kc3 Ra6 33.Rd4 Kf8 34.Rd8+ Ke7
35.Rd4 f5 36.Rh4 h6 37.Rf4 Kf6 38.g4 Kg5 39.Rxf5+ Kxg4 40.Rf7
g5 41.Rxb7 Ra5 42.Rb4+ Kf3 43.Rb6 Rc5+ 44.Kb4 Rb5+ 45.Rxb5 cxb5
46.Kxb5 Kxf2 47.Kxa4 Kg2 48.b4 Kxh2 49.b5 g4 50.b6 g3 51.b7 g2
52.b8Q+ Kh1 53.Qb7 Kh2 54.Qc7+ Kh1 55.Qc6 Kh2 56.Qxh6+ Kg1 57.Kb3
Kf1 58.Qf4+ Kg1 59.a4 Kh1 60.Qh4+ Kg1 61.a5 1-0
The issue is with the promotion notation. Only promotions with = are recognized, so instead of b8Q+ it would need to be b8=Q+