Anki stats no longer displaying - Invalid data found - please use Check Database to fix the problem

Updated to Version 2.1.29 yesterday and I’m having some issues with the new stats. The new stats worked fine when I was viewing them just for the “deck”, but as soon as I clicked on “Collection”, I got the following error message:


Some interesting behaviour I have found:

  • The old stats still work fine (if I shift click on the stats page, it opens as normal)
  • Disabling all add-ons does not make a difference on this issue
  • If I were to click on stats as soon as I open anki and I get onto the home screen, I get the error.
  • I’ve tried clicking through all of my decks and it seems to be one in particular that is causing the issue. This deck has worked fine with the previous stats, and I wonder if it is something to do with the unique card types within it.
  • I thought it might be an issue with night mode, but if I turn it off I still get the error

Perhaps a silly question, but did you use Tools>Check Database like it asked you to?

Not gonna lie, I didn’t realize this was a function (I had never used it before). It fixed it, thanks! I had a few cards with a due date in the 1000000s somehow.