DbError { info: "InvalidColumnType(6, \"factor\", Real)", kind: Other }

I started 2.1.66 on my 2.1.22 collection. It showed some DbErrors in the Browser. Exporting showed an exception.
I deleted all the contents and tags from all cards, because I want to try the optimizer in How to use the next-generation spaced repetition algorithm FSRS on Anki?
After running

mw.col.db.execute("update cards set factor=round(factor)")
mw.col.modSchema(False)

there are no more DbErrors near the top of the list in the Browser, but exporting (as described in that thread) still fails with DbError { info: "InvalidColumnType(6, \"factor\", Real)", kind: Other }

Try update cards set factor = cast(factor as int)

Same error. There may still be errors in the Browser, but none are near the top.
With 2.1.22, I’ve been using modified autoEaseFactor.
In 2.1.66 (running in safe mode, because it wouldn’t start otherwise), I turned the V3 scheduler on, but didn’t review anything.

What does this print?

select typeof(factor), count(*) from cards;

I restored 2.1.22 for now, but to make sure I am running the correct command, I tried with it:

>>> mw.col.db.execute("select typeof(factor), count(*) from cards;")
<no output>
>>> print(mw.col.db.execute("select typeof(factor), count(*) from cards;"))
<sqlite3.Cursor object at 0x7f61ac235880>

print(mw.col.db.all("select typeof(factor), count(*) from cards;"))

2.1.22:

>>> mw.col.db.execute("select typeof(factor), count(*) from cards;")
... print(mw.col.db.all("select typeof(factor), count(*) from cards;"))
[('integer', 172403)]

Not sure what’s going on there. Can you share the file with me?

Can you make the thread private? I don’t want to send it by e-mail.
2.1.66 output with the deck after all the operations is [['integer', 172429]]

You can contact me privately on https://anki.tenderapp.com

Sent as a .gz file. Trying to upload .zst and .anki2 caused errors.

update revlog set factor = max(0, cast(factor as integer));

Thank you, it was exported as a 37 MB .apkg file with a 103 MB collection.anki21 and small other files.

Going from my 2.1.22 collection to Anki 2.1.66 requires both sets of commands:

mw.col.db.execute("update cards set factor=round(factor)")
mw.col.modSchema(False)
print(mw.col.db.all("update revlog set factor = max(0, cast(factor as integer));"))

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.