ArneVogel/listudy

Trying to import a study, persistent syntax error

aoae23 opened this issue · 2 comments

Hello, I am trying to import a study but it is non-functional. The study in question is here: https://lichess.org/study/5bZ1m7hX
The error is as follows:
✕ SyntaxError at line: 16, character: 97; Unexpected: "r"
No chapters show up from the chapter dropdown menu, even though my study obviously has multiple.

Thinking perhaps it has too much text, I made a pared-down version to fit into the 50 kB limit (converted from .pgn to .txt from Github). But when I try to upload it directly to the study, it runs into the same error. When I try to edit the study later, the link is there, even though I had added the file via upload instead.
lichess_study_introduction-to-the-duras-gambit-and-related-openings_by_starpolemic_2022.07.10.txt
image

I'm not sure what's causing this. Is the study formatted wrong? Does God simply disapprove of my questionable opening choices? Please help. Thank you

Another user here just trying to help.

I think the problem is with the quotation marks in the Event names ie "xxxxxx" . So you probably need to fix all [Event] lines that contain escaped quotation marks. Remove them and see if it helps.

Not sure where the bug is, if it's in LiStudy code or one of the libraries used to parse PGN files. But this should get you going as a workaround.

aoae23, did this fix the problem? If so, would you mind closing the issue? Thanks.