Error when opening preferences

I am trying to open preferences in Anki Desktop. It fails and returns the following error:

An error occurred. Please use Tools > Check Database to see if that fixes the problem.
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.15 (442df9d6) Python 3.10.4 Qt 5.15.3 PyQt 5.15.6
Platform: Linux
Flags: frz=False ao=False sv=1

Caught exception:
File “/usr/share/anki/aqt/”, line 882, in onPrefs“Preferences”, self)
File “/usr/share/anki/aqt/”, line 82, in open
instance = creator(*args)
File “/usr/share/anki/aqt/”, line 25, in init
File “/usr/share/anki/aqt/”, line 80, in setupCollection
<class ‘TypeError’>: setValue(self, int): argument 1 has unexpected type ‘float’

I run the “check-database”-command in the menu tools, without any success to resolve the problem. I am using Linux Ubuntu 22.04.

It looks like you are using a rather old version of the program, if you don’t depend on specific add-ons, the first thing I’d try would be updating to a more recent version.


Now, I installed from snap (on Ubuntu 22.04). Now it works. I had installed Anki through aptitude.

The most reliable way to run current versions of Anki is to download them from the official website: Anki - powerful, intelligent flashcards

… and then use these commands to unpack and install the package:

tar xaf Downloads/anki-2.1.XX-linux-qt6.tar.zst
cd anki-2.1.XX-linux
sudo ./