Database in an "inconsistent state"


hi all

I got this error after I deleted card that is currently being displayed in the Study session.

This is the second time I get it. i reported this before somewhere on here some time ago.

subsequent errors are displayed as a box with an OK button rather than this frightening message.

database check was ok and nothing came out of it.

no addons

as far as i can tell, everything is fine. cards ok. review history intact. i closed and opened anki and my XXX pending reviews are right where i left them

error message

Anki 2.1.61 (0c1eaf4c) Python 3.9.15 Qt 6.4.2 PyQt 6.4.0

Caught exception:
Traceback (most recent call last):
  File "aqt.main", line 274, in on_focus_changed
  File "_aqt.hooks", line 3164, in __call__
  File "aqt.main", line 801, in on_focus_did_change
  File "aqt.reviewer", line 184, in refresh_if_needed
  File "aqt.reviewer", line 213, in _redraw_current_card
  File "", line 68, in load
  File "anki._backend_generated", line 1867, in get_card
  File "anki._backend", line 156, in _run_command
anki.errors.NotFoundError: Your database appears to be in an inconsistent state. Please use the Check Database action

to reproduce it:

  1. do some reviews
  2. reach a certain card
  3. open browser
  4. find the card you were currently reviewing
  5. delete it using the Browser
  6. Close the browser
  7. you should see that your deleted card now looks faded out
  8. press “Show answer” (if you havent pressed it already), and then try to rate it as “Good” >> error.

I’ve filed this on Study screen sometimes fails to refresh, and tries to access a deleted card · Issue #2470 · ankitects/anki · GitHub

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