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.

Update for PyQt6 compatibility

See original GitHub issue

PyQt6 has been released but pytest-qt does not yet support the new version. This causes most tests in my project to fail with the following error, though the application works as expected.

Example error (last few lines only):

INTERNALERROR>   File "/usr/local/var/pyenv/versions/3.9.0/envs/mn390/lib/python3.9/site-packages/pytestqt/qt_compat.py", line 83, in set_qt_api
INTERNALERROR>     raise RuntimeError(msg)
INTERNALERROR> RuntimeError: pytest-qt requires either PySide, PySide2, PyQt4 or PyQt5 to be installed
INTERNALERROR>   PyQt4.QtCore: No module named 'PyQt4'
INTERNALERROR>   PyQt5.QtCore: No module named 'PyQt5'
INTERNALERROR>   PySide.QtCore: No module named 'PySide'
INTERNALERROR>   PySide2.QtCore: No module named 'PySide2'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
The-Compilercommented, May 27, 2021

@othalan @GuillaumeFavelier @rbreu If anyone of you has a PyQt6 project to test with, it’d be great if you could try #340. For my own project I’m still waiting for QtWebEngine to come back with Qt 6.2, but at least pytest-qt’s selftests now work with PyQt6 🎉

1reaction
rbreucommented, May 31, 2021

Hi, I just wanted to let you know that I have ported all my unit tests from my previous workaround to pytest-qt and it works. Thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyQt5 vs PyQt6: What are the differences, and is it time to ...
The good news is that the change is backwards compatible: the fully-qualified names also work in PyQt5. So you can make the changes...
Read more >
PyQt6 - PyPI
Qt is set of cross-platform C++ libraries that implement high-level APIs for accessing many aspects of modern desktop and mobile systems.
Read more >
PyQt5 vs. PyQt6: Syntax Changes, Licenses, and Should you ...
PyQt5 vs. PyQt6 : Syntax Changes, Licenses, and Should you upgrade ? [2022].
Read more >
PyQt6 Released! What's new? - YouTube
So, PyQt6 is officially out! In this video, I will go over some of the changes over PyQt5.Buy Me a Coffee? Your support...
Read more >
Msys update pyqt from version 5 to version 6 - Stack Overflow
First i follow this solution, but then and PyQt5 had the same problem so,; I run pacman -Qqn | pacman -S - (updates...
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