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

PyQt5 import in qidenticon conflicts with installed PyQt4 if user has both #1901

Closed
g1itch opened this issue Dec 11, 2021 · 2 comments
Closed
Assignees
Labels
bug Something isn't working as it's supposed to usability

Comments

@g1itch
Copy link
Collaborator

g1itch commented Dec 11, 2021

Hello!

This is just appeared in the chan.

2021-12-11 16:56:33,495 - WARNING - Using default logger configuration
2021-12-11 16:56:33,777 - CRITICAL - Unhandled exception
Traceback (most recent call last):
  File "/usr/local/bin/pybitmessage", line 11, in <module>
    execfile(script_file, new_globals)
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessagemain.py", line 426, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessagemain.py", line 422, in main
    mainprogram.start()
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessagemain.py", line 296, in start
    bitmessageqt.run()
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessageqt/__init__.py", line 4186, in run
    myapp = MyForm()
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessageqt/__init__.py", line 621, in __init__
    self.ui.setupUi(self)
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessageqt/bitmessageui.py", line 566, in setupUi
    self.blackwhitelist.rerenderBlackWhiteList()
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessageqt/blacklist.py", line 178, in rerenderBlackWhiteList
    newItem.setIcon(avatarize(address))
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessageqt/utils.py", line 116, in avatarize
    return identiconize(address)
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/bitmessageqt/utils.py", line 39, in identiconize
    import qidenticon
  File "/usr/local/lib/python2.7/dist-packages/pybitmessage/qidenticon.py", line 46, in <module>
    from PyQt5 import QtCore, QtGui
RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class

I should've probably add a check for the situation when the end user has both PyQt4 and PyQt5 python2 libs.

@g1itch g1itch added bug Something isn't working as it's supposed to usability labels Dec 11, 2021
@PeterSurda
Copy link
Member

maybe some sort of helper_qt, or unify approach with #1389?

@g1itch g1itch self-assigned this Dec 13, 2021
@g1itch
Copy link
Collaborator Author

g1itch commented Dec 13, 2021

maybe some sort of helper_qt, or unify approach with #1389?

Hopely I can avoid another helper. Need to investigate it further. qidenticon should not be the first module importing Qt, at least in the qt5-wip.

g1itch added a commit to g1itch/PyBitmessage that referenced this issue Dec 14, 2021
g1itch added a commit to g1itch/PyBitmessage that referenced this issue Dec 14, 2021
@g1itch g1itch closed this as completed in 784562c Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as it's supposed to usability
Projects
None yet
Development

No branches or pull requests

2 participants