When I open the Preferences I get the error below [1]. Searching for this error online yields 2 search results from the anki forum which imply that updating to the recent version will fix that (see [2], [3]). [1] ### Anki 2.1.15 (442df9d6) Python 3.10.6 Qt 5.15.5 PyQt 5.15.6 Platform: Linux Flags: frz=False ao=False sv=1 Caught exception: File "/usr/lib/python3.10/site-packages/aqt/main.py", line 881, in onPrefs aqt.dialogs.open("Preferences", self) File "/usr/lib/python3.10/site-packages/aqt/__init__.py", line 82, in open instance = creator(*args) File "/usr/lib/python3.10/site-packages/aqt/preferences.py", line 25, in __init__ self.setupCollection() File "/usr/lib/python3.10/site-packages/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' [2] ### https://forums.ankiweb.net/t/bugreport-anki-desktop-at-fedora-35/14635 [3] ### https://forums.ankiweb.net/t/unexpected-type-float/22797 Reproducible: Always Steps to Reproduce: 1. Install app-misc/anki-2.1.15-r1 2. Open Application, language English 3. Tools ⇾ Preferences Actual Results: 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.6 Qt 5.15.5 PyQt 5.15.6 Platform: Linux Flags: frz=False ao=False sv=1 Caught exception: File "/usr/lib/python3.10/site-packages/aqt/main.py", line 881, in onPrefs aqt.dialogs.open("Preferences", self) File "/usr/lib/python3.10/site-packages/aqt/__init__.py", line 82, in open instance = creator(*args) File "/usr/lib/python3.10/site-packages/aqt/preferences.py", line 25, in __init__ self.setupCollection() File "/usr/lib/python3.10/site-packages/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' Expected Results: It opens the preferences window. Software recommends to "Check database" — does unsurprisingly not work.
I think this is essentially a duplicate of bug 782373 for the version bump part, so dropping that from summary.
This was fixed upstream here: https://github.com/ankitects/anki/commit/d2ae874d9e1615d09afc912275cc3b27776a1392. The patch doesn't apply as is because the code has changed a bit, but it still was easy to backport.
Created attachment 860676 [details, diff] patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd2f4e45cae5ffb8cdab1f2942312b49497e24a commit 5bd2f4e45cae5ffb8cdab1f2942312b49497e24a Author: Sam James <sam@gentoo.org> AuthorDate: 2023-06-13 21:28:53 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-06-13 21:29:27 +0000 app-misc/anki: update EAPI 7 -> 8, enable py3.11, fix prefs Thanks to WGH for the backport of the pref fix. Closes: https://bugs.gentoo.org/869917 Closes: https://bugs.gentoo.org/896566 Signed-off-by: Sam James <sam@gentoo.org> app-misc/anki/anki-2.1.15-r2.ebuild | 95 +++++++++++++++++++++++++ app-misc/anki/files/anki-2.1.15-fix-prefs.patch | 17 +++++ 2 files changed, 112 insertions(+)
Same error for Deck Preferences. Steps to Reproduce: 1. Install app-misc/anki-2.1.15-r2 2. Open Application, language English 3. Click on a gear by any deck -> select Options 4. Get this error message: 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.11.4 Qt 5.15.9 PyQt 5.15.9 Platform: Linux Flags: frz=False ao=False sv=2 Caught exception: File "/usr/lib/python3.11/site-packages/aqt/deckbrowser.py", line 213, in <lambda> a.triggered.connect(lambda b, did=did: self._options(did)) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/aqt/deckbrowser.py", line 242, in _options self.mw.onDeckConf() File "/usr/lib/python3.11/site-packages/aqt/main.py", line 868, in onDeckConf aqt.deckconf.DeckConf(self, deck) File "/usr/lib/python3.11/site-packages/aqt/deckconf.py", line 25, in __init__ self.setupConfs() File "/usr/lib/python3.11/site-packages/aqt/deckconf.py", line 49, in setupConfs self.loadConfs() File "/usr/lib/python3.11/site-packages/aqt/deckconf.py", line 66, in loadConfs self.onConfChange(startOn) File "/usr/lib/python3.11/site-packages/aqt/deckconf.py", line 89, in onConfChange self.loadConf() File "/usr/lib/python3.11/site-packages/aqt/deckconf.py", line 175, in loadConf f.lrnFactor.setValue(c['initialFactor']/10.0) <class 'TypeError'>: setValue(self, val: int): argument 1 has unexpected type 'float'
Created attachment 867722 [details, diff] Patch for deck options