Caught exception: aqt.dialogs.open("Preferences", self)

Bug #2015698 reported by Lyubomir
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
anki (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This happens when trying to open Tools -> Preferences

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.7 Qt 5.15.6 PyQt 5.15.7
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'

ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: anki 2.1.15+dfsg-3
ProcVersionSignature: Ubuntu 5.19.0-38.39-generic 5.19.17
Uname: Linux 5.19.0-38-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Sun Apr 9 21:20:59 2023
InstallationDate: Installed on 2023-02-25 (43 days ago)
InstallationMedia: Kubuntu 22.10 "Kinetic Kudu" - Release amd64 (20221020)
PackageArchitecture: all
SourcePackage: anki
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lyubomir (mystiquewolf) wrote :
Revision history for this message
Jim Muchow (jdavidm) wrote :

I have the same problem with few small version differences (for example, I am using Ubuntu 22.04-jammy). When I run anki (same version) on another box running 20.04-focal, this error does not occur.

I think the problem is due to the change in the Qt5 and/or Python versions between 20.04 and 22.04 for the same version of anki, 2.1.15 (442df9d6).

When I get the error described here, the version info is
Anki 2.1.15 (442df9d6) Python 3.10.6 Qt 5.15.3 PyQt 5.15.6

When I find the version info on my 20.04 box, I find
Anki 2.1.15 (442df9d6) Python 3.08.2 Qt 5.12.8 PyQt 5.14.1

Something changed. Are there other apps the need these new versions of Qt and/or Python?

I don't know how many ways this error occurs, but trying to open Tools->Preferences is definitely the main one. I thought I encountered it doing something else, but that doesn't seem to be the case.

I would add that I can work around the problem by using the -X option with ssh to connect from the 22.04 machine to the 20.04 machine.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in anki (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.