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

Closed
opened 2021-12-11 19:54:43 +01:00 by g1itch · 2 comments
g1itch commented 2021-12-11 19:54:43 +01:00 (Migrated from github.com)

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.

Hello! This is just appeared in the chan. ```python 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.
PeterSurda commented 2021-12-13 06:50:48 +01:00 (Migrated from github.com)

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

maybe some sort of `helper_qt`, or unify approach with #1389?
g1itch commented 2021-12-13 15:01:34 +01:00 (Migrated from github.com)

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.

> 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`.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-05#1901
No description provided.