Some PyQt4 applications fail to start in Yakkety due to missing PyQt4-WebKit

Bug #1633819 reported by David Oftedal
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
python-qt4 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

https://bugs.launchpad.net/ubuntu/+source/mnemosyne/+bug/1633725

Traceback (innermost last):
  File "/usr/bin/mnemosyne", line 155, in <module>
    debug_file=options.debug_file)
  File "/usr/lib/python2.7/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 164, in initialise
    self.register_components()
  File "/usr/lib/python2.7/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 215, in register_components
    exec("from %s import %s" % (module_name, class_name))
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/mnemosyne/pyqt_ui/review_wdgt.py", line 5, in <module>
    from PyQt4 import QtCore, QtGui, QtWebKit
 ImportError: cannot import name QtWebKit

https://bugs.launchpad.net/ubuntu/+source/anki/+bug/1633737

Anki fails to start in Yakkety due to a failure to import QtWebKit.

Traceback (most recent call last):
  File "/usr/bin/anki", line 7, in <module>
    import aqt
  File "/usr/share/anki/aqt/__init__.py", line 12, in <module>
    from aqt.qt import *
  File "/usr/share/anki/aqt/qt.py", line 22, in <module>
    from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings
ImportError: No module named QtWebKit

https://bugs.launchpad.net/ubuntu/+source/spyder/+bug/1620300

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/spyderlib/spyder.py", line 2331, in main
    mainwindow = run_spyder(app, options, args)
  File "/usr/lib/python2.7/dist-packages/spyderlib/spyder.py", line 2215, in run_spyder
    main.setup()
  File "/usr/lib/python2.7/dist-packages/spyderlib/spyder.py", line 734, in setup
    message=_("Spyder Internal Console\n\n"
  File "/usr/lib/python2.7/dist-packages/spyderlib/plugins/console.py", line 74, in __init__
    self.find_widget.set_editor(self.shell)
  File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/findreplace.py", line 260, in set_editor
    from spyderlib.qt.QtWebKit import QWebView
  File "/usr/lib/python2.7/dist-packages/spyderlib/qt/QtWebKit.py", line 10, in <module>
    from PyQt4.QtWebKit import * # analysis:ignore
ImportError: No module named QtWebKit

Tags: yakkety
David Oftedal (rounin)
summary: - PyQt4 applications fail to start in Yakkety due to missing QtWebKit
+ Some PyQt4 applications fail to start in Yakkety due to missing QtWebKit
description: updated
Revision history for this message
Hans Joachim Desserud (hjd) wrote : Re: Some PyQt4 applications fail to start in Yakkety due to missing QtWebKit

I did some searching and found https://wiki.debian.org/Qt4WebKitRemoval. It looks like the webkit part has been removed from Qt4, related to migration to Qt5/blink.

Revision history for this message
David Oftedal (rounin) wrote :

Wow, thanks! That seems to explain it. That seems to indicate that all packages depending on PyQt4 and QtWebKit are broken right now. Quite vexing.

Revision history for this message
David Oftedal (rounin) wrote :

By the way, that information you posted really helped, hjd. By downgrading to python-qt4=4.11.4+dfsg-1build4 python-qt4-sql=4.11.4+dfsg-1build4, I managed to get both Mnemosyne and Anki running again. Most likely other programs would run as well.

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

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

Changed in python-qt4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Rasmus Underbjerg Pinnerup (pinnerup) wrote :

Wow, this is an unfortunate surprise after upgrading to 16.10. I cannot do without Anki. How did you perform the downgrade, David?

Revision history for this message
David Oftedal (rounin) wrote :

su
apt-get install python-qt4=4.11.4+dfsg-1build4 python-qt4-sql=4.11.4+dfsg-1build4
apt-mark hold python-qt4 python-qt4-sql

Revision history for this message
David Oftedal (rounin) wrote :

(The apt-mark hold bit prevents the packages from being upgraded. apt-mark unhold then presumably allows them to be upgraded again.)

summary: - Some PyQt4 applications fail to start in Yakkety due to missing QtWebKit
+ Some PyQt4 applications fail to start in Yakkety due to missing
+ PyQt4-WebKit
Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

@ hjd: Such incidents would (to my mind) require a mentioning in the release-notes. What could one do to achieve such?

Changed in python-qt4 (Debian):
status: Unknown → New
Revision history for this message
Rasmus Underbjerg Pinnerup (pinnerup) wrote :

@David: Thank you; that doesn't seem to work here, tho. When I run apt-get, it replies with:
 E: Version ‘4.11.4+dfsg-1build4’ for ‘python-qt4’ was not found
 E: Version ‘4.11.4+dfsg-1build4’ for ‘python-qt4-sql’ was not found
It seems it doesn't have access to earlier versions that the installed one ("4.11.4+dfsg-2").

Revision history for this message
David Oftedal (rounin) wrote :

Ah! I forgot you also have to add back the old Xenial repositories.

1. su
2. echo "deb http://archive.ubuntu.com/ubuntu/ xenial universe" >> /etc/apt/source.list
3. echo "deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe" >> /etc/apt/source.list
4. apt-get update
5. apt-get install python-qt4=4.11.4+dfsg-1build4 python-qt4-sql=4.11.4+dfsg-1build4
6. apt-mark hold python-qt4 python-qt4-sql

Make sure you use two greater-than signs ( >> ) when adding to source.list!

Revision history for this message
David Oftedal (rounin) wrote :

Sorry, source_s_.list:

1. su
2. echo "deb http://archive.ubuntu.com/ubuntu/ xenial universe" >> /etc/apt/sources.list
3. echo "deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe" >> /etc/apt/sources.list
4. apt-get update
5. apt-get install python-qt4=4.11.4+dfsg-1build4 python-qt4-sql=4.11.4+dfsg-1build4
6. apt-mark hold python-qt4 python-qt4-sql

Mathew Hodson (mhodson)
affects: python-qt4 (Debian) → debian
Changed in debian:
importance: Unknown → Undecided
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu:
status: New → Confirmed
Mathew Hodson (mhodson)
affects: debian → ubuntu
no longer affects: ubuntu
Revision history for this message
David Oftedal (rounin) wrote :

This bug is not a duplicate of bug #1633737, because it's known to affect at least three separate applications using Python-Qt4.

While the packages for these applications could be separately fixed, downgrading or otherwise fixing the Python-Qt4 package would fix the issue for all the applications at once. This is a separate issue which would merely affect each of the others.

Revision history for this message
Rasmus Underbjerg Pinnerup (pinnerup) wrote :

@David: That worked! Thank you very much for your help. I hope the overarching issue is resolved soon :)

Revision history for this message
scruss (scruss) wrote :
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Won’t fix. The WebKit support was removed on purpose, because of security issues. It is highly recommended to migrate to PyQt5 (which does have WebKit support).

Changed in python-qt4 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Natim (site-remy) wrote :

Well breaking software even for security reasons is not acceptable.

Revision history for this message
themusicgod1 (themusicgod1) wrote :

Natim: it's not helpful to merely say that. What software specifically is broken for you? qgis, spyder, anki or something else? (Mnemosyne has already been migrated to PyQt5 in newer releases of ubuntu)

Revision history for this message
programaths (programaths) wrote :

Looks like "apturl" is broken by this too :

christian@christian-dv7 ~> apturl
Traceback (most recent call last):
  File "/usr/bin/apturl-kde", line 34, in <module>
    from AptUrl.kde.KdeUI import KdeUI
  File "/usr/lib/python3/dist-packages/AptUrl/kde/KdeUI.py", line 5, in <module>
    from PyQt4.QtWebKit import QWebView
ImportError: No module named 'PyQt4.QtWebKit'

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Fwiw the apturl issue is also reported as bug 1655387.

Revision history for this message
Boris Maryshev (borism) wrote :

gr-air-modes is also broken due to this

Revision history for this message
Rolf Leggewie (r0lf) wrote :

The problem is fixed for anki in artful and bionic. Please open tickets against other packages if they still depend on PyQt4.

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.