# Error when opening preferences

**URL:** <https://forums.ankiweb.net/t/error-when-opening-preferences/20397>\
**Category:** Help\
**Created:** [May 29, 2022, 4:42pm UTC](https://forums.ankiweb.net/t/error-when-opening-preferences/20397 "2022-05-29T16:42:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fermat](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@fermat](https://forums.ankiweb.net/u/fermat)\
**Post date:** [May 29, 2022, 4:42pm UTC](https://forums.ankiweb.net/t/error-when-opening-preferences/20397/1 "2022-05-29T16:42:54Z")

</div>

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

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/main.py”, line 882, in onPrefs  
aqt.dialogs.open(“Preferences”, self)  
File “/usr/share/anki/aqt/ **init**.py”, line 82, in open  
instance = creator(\*args)  
File “/usr/share/anki/aqt/preferences.py”, line 25, in **init**  
self.setupCollection()  
File “/usr/share/anki/aqt/preferences.py”, line 80, in setupCollection  
f.lrnCutoff.setValue(qc[‘collapseTime’]/60.0)  
\<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.

---

<div class="post-metadata">

**Author:** ![cqg](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@cqg](https://forums.ankiweb.net/u/cqg)\
**Post date:** [May 29, 2022, 4:48pm UTC](https://forums.ankiweb.net/t/error-when-opening-preferences/20397/2 "2022-05-29T16:48:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fermat](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@fermat](https://forums.ankiweb.net/u/fermat)\
**Post date:** [May 29, 2022, 5:46pm UTC](https://forums.ankiweb.net/t/error-when-opening-preferences/20397/3 "2022-05-29T17:46:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [May 29, 2022, 7:17pm UTC](https://forums.ankiweb.net/t/error-when-opening-preferences/20397/4 "2022-05-29T19:17:12Z")

</div>

> [@Error on entering settings and adding note type](https://forums.ankiweb.net/t/error-on-entering-settings-and-adding-note-type/20244/4):
>
> Be aware that snap has the same issue as apt, meaning that some packaged version of Anki are outdated (even though not as severely as for most other distributions). In particular, [anki-woodrow](https://snapcraft.io/anki-woodrow) is outdated (2.1.35 and no longer updated), as well as [anki-ppd](https://snapcraft.io/anki-ppd) (2.1.49 and actively supported). As a comparison, the latest version of Anki stable is 2.1.52 (at the time I write this). To have an overview on what is the state of packaging of Anki for a certain package manager (or to find package managers …

The most reliable way to run current versions of Anki is to download them from the official website: [Anki - powerful, intelligent flashcards](https://apps.ankiweb.net/#download)

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

```auto
tar xaf Downloads/anki-2.1.XX-linux-qt6.tar.zst
cd anki-2.1.XX-linux
sudo ./install.sh

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 4:14am UTC](https://forums.ankiweb.net/t/error-when-opening-preferences/20397/5 "2023-05-01T04:14:38Z")

</div>


