The plugin is broken. Python said: cannot import name QtWebKit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qgis (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
when trying to load the OpenLayersPlugin in qgis there's an error message:
The plugin is broken. Python said:cannot import name QtWebKit
Reason revealed by strace:
qgis uses /usr/bin/python, which is a link to python 2.7 under ubuntu, and then does not find a particular python lib:
17171 stat("/
17171 openat(AT_FDCWD, "/usr/lib/
17171 openat(AT_FDCWD, "/usr/lib/
17171 openat(AT_FDCWD, "/usr/lib/
17171 openat(AT_FDCWD, "/usr/lib/
17171 openat(AT_FDCWD, "/usr/lib/
apt-file says there are no such files in bionic. Bionic offers files for PyQt5, but not PyQt4.
I'm not sure whether this is a problem of that particular plugin or a general standard for qgis, to still use PyQt4.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: qgis 2.18.17+dfsg-1
ProcVersionSign
Uname: Linux 4.15.0-22-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: LXDE
Date: Thu May 24 17:02:59 2018
InstallationDate: Installed on 2018-04-30 (24 days ago)
InstallationMedia: Lubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: qgis
UpgradeStatus: No upgrade log present (probably fresh install)
Hi Hadmut,
On Thu, 24. May 2018 at 15:15:01 -0000, Hadmut Danisch wrote:
> I'm not sure whether this is a problem of that particular plugin or a general
> standard for qgis, to still use PyQt4.
PyQt4 is not the problem - without it QGIS 2.x wouldn't run at all.
But QtWebKit is not available for PyQt4 anymore in Debian/Ubuntu. IIRC because
the webkit C++ libraries were about to be removed and PyQt4.QtWebKit was
removed upfront. QGIS itself doesn't use it, but a bunch of plugins do -
openlayers being one of them.
So this is not an actual qgis packaging problem, nor an upstream problem, nor a
problem of the plugin.
The removal of the C++ libraries never happened and the QGIS packages from
qgis.org include the PyQt4.QtWebKit bindings based on the still available
libraries.
Jürgen
-- www.norbit. de
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://