edubuntu-bugs team mailing list archive
-
edubuntu-bugs team
-
Mailing list archive
-
Message #10666
[Bug 2015698] Re: [SRU] Caught exception: aqt.dialogs.open("Preferences", self)
** Summary changed:
- Caught exception: aqt.dialogs.open("Preferences", self)
+ [SRU] Caught exception: aqt.dialogs.open("Preferences", self)
** Description changed:
- This happens when trying to open Tools -> Preferences
+ [ Impact ]
- 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
+ Users will fail to open the preferences window to set their preferences.
+ The usual window will not be displayed instead the windows will have an error message:
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'
+
+ [ Test Plan ]
+
+ install anki.
+ start anki
+ Click on Tools -> Preferences
+
+ If the package is not fixed the Prefenrences window will show the above
+ error.
+
+ With the fixed package, we can open the Preferences window after anki
+ has started.
+
+ Just to test anki still works:
+ 1. Click on "Create Deck" and create a deck
+ 2. Create a file in any folder with the content "what am I doing?;Testing SRU" or any content you want with text separated by semicolons.
+ 3. Click on File -> Import and select the text file created in above step.
+ 4. Click on the Deck name, and then click on "Study Now".
+ 5. It should show the question "what am I doing?"
+ 6. Click on "Show Answer", and it will show "Testing SRU".
+
+ [ Where problems could occur ]
+
+ The typecast to int of 'timeLim' might cause some change in the time
+ limit if the user tries to change that value in the preferences. Since
+ it is being divided by 60.0 so any value from 0 to 59 will result in the
+ 'timeLim' being set to 0. So, users who are using this range of value
+ may find the timelimit not working.
+
+ [ Other Info ]
+
+ The problem is because of the strict type checking in Python 3.10 and was fixed via https://launchpad.net/bugs/2004098
+ But that change missed one line in the preferences code, which resulted in this problem.
+
+ I have added this change in that old patch instead of creating a new
+ patch.
+
+ For Jammy:
+ https://launchpad.net/bugs/2004098 was not fixed in Jammy even though Jammy was impacted.
+
+ [ Original 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)
--
You received this bug notification because you are a member of Edubuntu
Bugsquad, which is subscribed to anki in Ubuntu.
https://bugs.launchpad.net/bugs/2015698
Title:
[SRU] Caught exception: aqt.dialogs.open("Preferences", self)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/anki/+bug/2015698/+subscriptions
References