From 672e19df8583be16c4d6445fd80c12d071a66f78 Mon Sep 17 00:00:00 2001 From: Blauelf Date: Fri, 30 Aug 2019 14:56:44 +0200 Subject: [PATCH] Prevent non-integer ivl when importing from Mnemosyne A reddit user had a few issues when importing from Mnemosyne, one of which was non-integer values interpreted as "v2 scheduler bug". I assume that's the line where they originated. https://www.reddit.com/r/Anki/comments/cxcv27/what_just_happened_cards_with_v2_scheduler_bug/ --- anki/importing/mnemo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/importing/mnemo.py b/anki/importing/mnemo.py index 2cfc1ddbe..0cfaf195e 100644 --- a/anki/importing/mnemo.py +++ b/anki/importing/mnemo.py @@ -76,7 +76,7 @@ acq_reps+ret_reps, lapses, card_type_id from cards"""): c.lapses = row[7] # ivl is inferred in mnemosyne next, prev = row[3:5] - c.ivl = max(1, (next - prev)/86400) + c.ivl = max(1, (next - prev)//86400) # work out how long we've got left rem = int((next - time.time())/86400) c.due = self.col.sched.today+rem