FS#61710 - [pyqt5][anki] 5.12's removal of QtWebEngine support breaks Anki

Attached to Project: Arch Linux
Opened by Andreas (misc) - Sunday, 10 February 2019, 19:40 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 12 February 2019, 21:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Johannes Löthberg (demize)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Anki relies on PyQt5.QtWebEngine[Widgets] and will now crash on start with 5.12 removing just that.
This task depends upon

Closed by  Antonio Rojas (arojas)
Tuesday, 12 February 2019, 21:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  anki 2.1.8-3
Comment by Andreas (misc) - Sunday, 10 February 2019, 19:50 GMT
Sorry, I only just noticed it's not a removal but it being separated out into the new python-pyqtwebengine package.

In that case it would ofc be but a simple issue with anki's packaging, but it's still crashing for me with

>NameError: name 'QWebEngineView' is not defined
Comment by Eli Schwartz (eschwartz) - Sunday, 10 February 2019, 21:29 GMT
See https://www.archlinux.org/todo/pyqtwebengine-split/

I'm told the move was done in testing, not staging, as it makes it easier to test which packages needed the change, and because the solution is to simply add a dependency (so affected users can simply pacman -S python-pyqtwebengine).

Either way, anki is now marked as completed, simply pacman -Syu and a new version of anki will be installed that adds the missing dependency.
Comment by Andreas (misc) - Sunday, 10 February 2019, 21:39 GMT
  • Field changed: Percent Complete (100% → 0%)
Even with anki 2.1.8-2 resp. python-pyqtwebengine I now still get the (new) "'QWebEngineView' is not defined" startup crash.
Comment by Antonio Rojas (arojas) - Sunday, 10 February 2019, 21:42 GMT
"from PyQt5.Qt import *" no longer imports QtWebEngine modules, so they need to be explicitely imported now.

--- /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:
Comment by Andreas (misc) - Sunday, 10 February 2019, 21:49 GMT
Yes, that fixes it. Thanks.

[Unrelated to this issue, in case demize reads this: There may be an issue with the upcoming Anki 2.1.9 that requires some users to act *before* updating, see "Changes in 2.1.9beta1" on https://apps.ankiweb.net/docs/beta.html ]

Loading...