question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class

See original GitHub issue

I try to use pywebview (1.8) for a REMI project on Raspbian Stretch. I am using Python 2.7 and PyQt4. There is also Python 3 and PyQt5 installed on my system. When I start my program as standalone (running it with pywebview) this error occurs:

webview.qt ERROR PyQt5 or one of dependencies is not found

And at the end also this one occurs:

RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class

It seems like pywebview tries to use both Qt installations?

img_6888

img_6887

img_6891

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Counterdoccommented, Jan 4, 2018

Okay, I can confirm it now. pywebview is working with Raspbian Jessie (Debian Jessie) and PyQt4. It is NOT working with PyQt4 on any Debian Stretch based distribution.

1reaction
Counterdoccommented, Jan 3, 2018

That was one problem, yes. I did a fresh install and tried a simple import which fails:

from PyQt4.QtWebKit import QWebView

results in: ImportError: No module named QtWebKit

QtWebKit is no longer supported/installed with PyQt4. So I guess using pywebview with PyQt4 will not work on any new installation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

the PyQt4.QtCore and PyQt5.QtCore modules both wrap the ...
... and PyQt5.QtCore modules both wrap the QObject class I don't install pyqt5. ... RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules ...
Read more >
How to force PyQt5 use for QObject class? - Stack Overflow
A RuntimeError with message. the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class. is raised the moment you try to import PyQt5....
Read more >
the PyQt4.QtCore and PyQt5.QtCore modules both wrap the ...
RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class ... Qubes OS version Qubes release 4.0 (R4.0) Affected ...
Read more >
Developers - RuntimeError: the PyQt4.QtCore and PyQt5 ...
RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class · 1. Open a dom0 terminal · 2. Execute: qubes-qube-manager · 3....
Read more >
[Example code]-How to force PyQt5 use for QObject class?
RuntimeError : the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class. Python interpreter locates the error in the file "ViewWindow.py", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found