brownbat/autoEaseFactor

rsbackend error on first review in .38

brownbat opened this issue · 1 comments

Caught exception:
Traceback (most recent call last):
  File "aqt\reviewer.py", line 308, in <lambda>
  File "<decorator-gen-22>", line 2, in _answerCard
  File "anki\hooks.py", line 89, in decorator_wrapper
  File "anki\hooks.py", line 84, in repl
  File "aqt\reviewer.py", line 268, in _answerCard
  File "aqt\hooks_gen.py", line 2336, in __call__
  File "C:\Users\thomas\AppData\Roaming\Anki2\addons21\1672712021\autoEaseFactor.py", line 179, in adjust_factor
    card.factor = suggested_factor(card, new_answer)
  File "C:\Users\thomas\AppData\Roaming\Anki2\addons21\1672712021\autoEaseFactor.py", line 86, in suggested_factor
    card_settings['review_list'] = get_all_reps(card)
  File "C:\Users\thomas\AppData\Roaming\Anki2\addons21\1672712021\autoEaseFactor.py", line 50, in get_all_reps
    return mw.col.db.list(("select ease from revlog where cid = ?"
  File "anki\dbproxy.py", line 64, in list
  File "anki\dbproxy.py", line 55, in _query
  File "anki\rsbackend.py", line 210, in db_query
  File "anki\rsbackend.py", line 233, in _db_command
anki.rsbackend.DBError: DBError { info: "SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some(\"incomplete input\"))", kind: Other }

Seems to deal with:

  def get_all_reps(card=mw.reviewer.card):
       return mw.col.db.list(("select ease from revlog where cid = ?"), card.id)

Trying to debug, a little slow at understanding how the db queries changed, or if that's what's driving this. Appreciate any pointers.

Fixed in testing code before live.