edubuntu-bugs team mailing list archive
-
edubuntu-bugs team
-
Mailing list archive
-
Message #09008
[Bug 1825722] Re: Anki fails to start because QWebEngineView is not defined (missing import)
SRU template applied.
** Changed in: anki (Ubuntu Eoan)
Status: Confirmed => Fix Committed
** Description changed:
+ [Impact]
+
+ Due to changes in PyQt (according to Arch), the Anki application fails
+ to run because library imports have been altered in a way that causes
+ the application to not execute and start under any circumstances.
+
+ This makes the application as is currently unusable.
+
+
+ [Test Case]
+
+ (1) Install Ubuntu Disco or Ubuntu Eoan.
+
+ (2) Install anki from repositories as-is (2.1.8+dfsg-1)
+
+ (3) Attempt to run `anki` on command line, you get the traceback stated
+ in the original description.
+
+ (4) Use the PPA or the version in the repos/proposed.
+
+ (5) Anki properly runs without error and starts up as expected.
+
+
+ [Regression Potential]
+
+ From a code perspective, the only thing we do is we pull in all the
+ libraries and classes from PyQt5.QtWebEngineWidgets. In the long term
+ this could cause breakages if PyQt changes again.
+
+ However, in the intervening *short term*, this change does not introduce
+ any major code or functional changes other than to make the various
+ classes available for use, and the regression risk from this change is
+ minimal.
+
+
+ [Additional Information]
+
+ This was tested in a Disco and an Eoan VM running inside VMware. The
+ test cases were both able to be tested without issue there, and are as
+ written.
+
+ There is a PPA with these changes available, linked in the comments.
+
+
+ [Original Description]
+
Trying to start Anki version 2.1.8+dfsg-1 from Ubuntu 19.04 fails with
the following error:
Traceback (most recent call last):
- File "/usr/bin/anki", line 6, in <module>
- import aqt
- File "/usr/share/anki/aqt/__init__.py", line 32, in <module>
- import aqt.forms
- File "/usr/share/anki/aqt/forms/__init__.py", line 44, in <module>
- from . import about
- File "/usr/share/anki/aqt/forms/about.py", line 42, in <module>
- from aqt.webview import AnkiWebView
- File "/usr/share/anki/aqt/webview.py", line 90, in <module>
- class AnkiWebView(QWebEngineView):
+ File "/usr/bin/anki", line 6, in <module>
+ import aqt
+ File "/usr/share/anki/aqt/__init__.py", line 32, in <module>
+ import aqt.forms
+ File "/usr/share/anki/aqt/forms/__init__.py", line 44, in <module>
+ from . import about
+ File "/usr/share/anki/aqt/forms/about.py", line 42, in <module>
+ from aqt.webview import AnkiWebView
+ File "/usr/share/anki/aqt/webview.py", line 90, in <module>
+ class AnkiWebView(QWebEngineView):
NameError: name 'QWebEngineView' is not defined
This appears to be due to changes in the PyQt, as described in this Arch
bug report: https://bugs.archlinux.org/task/61710
The patch suggested there by Antonio Rojas works on my Ubuntu 19.04
system, too:
--- /usr/share/anki/aqt/qt.py.orig 2019-02-10 22:41:21.648827256 +0100
+++ /usr/share/anki/aqt/qt.py 2019-02-10 22:38:17.798020886 +0100
@@ -13,7 +13,7 @@
from PyQt5.Qt import *
# trigger explicit message in case of missing libraries
# instead of silently failing to import
-from PyQt5.QtWebEngineWidgets import QWebEnginePage
+from PyQt5.QtWebEngineWidgets import *
try:
from PyQt5 import sip
except ImportError:
** Changed in: anki (Ubuntu Disco)
Assignee: Thomas Ward (teward) => (unassigned)
** Changed in: anki (Ubuntu Disco)
Status: Confirmed => In Progress
--
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/1825722
Title:
Anki fails to start because QWebEngineView is not defined (missing
import)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/anki/+bug/1825722/+subscriptions
References