Continuing the discussion from FSRS unable to optimize error… trying to fix it:
This came up while trying to troubleshoot FSRS Optimization for a user – @Alexsej spotted that one of the issues was a preset name with quotation marks.
We resolved things for the user, but they didn’t capture the answer we needed, so I reproduced it [on real data in an outdated backup of my collection]. This is the same preset with the same decks and review history each time, freshly renamed.
Control case
Preset name without quotation marks Default
, FSRS optimizes successfully on 22K reviews.
Error case A
Preset name with leading quotation mark "De"fault
, FSRS builds an invalid default query, so optimization fails with a search error. Similar error for an odd number of quotation marks.
Error case B
Preset name with internal quotation marks Def"au"lt
, FSRS returns as currently optimal. I suspect that the search query is now valid but it is looking for something that doesn’t exist. A search for preset Def
, string au
, string lt
returns no matching review history.
Solution
FSRS needs to build a viable default search query, including necessary escape characters.
Alternate Solution
Anki needs to disallow preset names with quotation marks.
Yes, I’m back on 24.06, but I don’t see any indication that this has been fixed since then. Anyone using a Beta or RC want to check that it reproduces there?
Anki 24.06.2 (33a92379) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.22621