Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Osndok opened this issue May 25, 2020 · 4 comments
Labels
C: manager/widget P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.0-dom0-stable T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@Osndok
Copy link

Osndok commented May 25, 2020

Qubes OS version
Qubes release 4.0 (R4.0)

Affected component(s) or functionality
qubes-qube-manager
qubes-template-manager

Brief summary
Installing an app that depends on python3-qt5 breaks the qube-manager & template-manager launch scripts.

To Reproduce
Steps to reproduce the behavior:

  1. Open a dom0 terminal
  2. Execute: sudo qubes-dom0-update python3-qt5
  3. Execute: qubes-qube-manager
  4. See error (copied below)

Expected behavior
Installing other tools into dom0 should not break qubes tools.

Actual behavior
Installing python-based qt5 tools breaks at least two qubes apps.

Screenshots

[user@dom0 ~]$ qubes-qube-manager 
Traceback (most recent call last):
  File "/usr/bin/qubes-qube-manager", line 9, in <module>
    load_entry_point('qubesmanager==4.0.41', 'console_scripts', 'qubes-qube-manager')()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2575, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2235, in load
    return self.resolve()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2241, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.5/site-packages/qubesmanager/qube_manager.py", line 40, in <module>
    from PyQt4 import QtGui  # pylint: disable=import-error
RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class

Additional context
The python3-qt5 package brings in about 80mb of dependencies, but I'm pretty sure that it is the one that is actually disrupting the qubes apps.

Solutions you've tried
Executing sudo dnf remove python3-qt5 can be used to temporarily workaround the issue. I suspect that one could use a harsher rpm command to remove only that package without dependencies to get the same effect (while leaving the system in an inconsistent state).

Relevant documentation you've consulted
I have not consulted any Qubes documentation about this issue.

Related, non-duplicate issues

Other qt5 issue?

@Osndok Osndok added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels May 25, 2020
@marmarek
Copy link
Member

AFAIR quamash module loads qt5 when available, but qubes manager in R4.0 uses qt4. There was a method to force specific version, @marmarta do you remember how? Can you put that into qubes manager code (into release4.0 branch)? I assume it applies to all applications in qubes-manager repository (all are pyqt based).

marmarta added a commit to marmarta/qubes-manager that referenced this issue May 26, 2020
marmarta added a commit to marmarta/qubes-manager that referenced this issue May 26, 2020
marmarta added a commit to marmarta/qubes-manager that referenced this issue May 26, 2020
marmarta added a commit to marmarta/qubes-manager that referenced this issue May 26, 2020
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone May 28, 2020
@marmarek
Copy link
Member

Fixed in QubesOS/qubes-manager#237

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-manager-4.0.42-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-manager-4.0.42-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: manager/widget P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.0-dom0-stable T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants