QColor error
Closed this issue · 3 comments
RasmusFonseca commented
Following the tutorial I get the following error when Accumulating Scores:
(py27) MBPro:~/Programs $ pycontact
PyQt5.QtCore.QRect(0, 0, 640, 480)
Running on 4 cores
Accumulation maps: [False, True, True, False, False] [False, True, True, False, False]
Running on 4 cores
PyQt5.QtCore.QRect(0, 0, 640, 480)
Traceback (most recent call last):
File "/Users/rfonseca/Programs/miniconda3/envs/py27/lib/python2.7/site-packages/pycontact-1.0.2-py2.7-macosx-10.6-x86_64.egg/PyContact/gui/Canvas.py", line 89, in paintEvent
self.renderContact(False)
File "/Users/rfonseca/Programs/miniconda3/envs/py27/lib/python2.7/site-packages/pycontact-1.0.2-py2.7-macosx-10.6-x86_64.egg/PyContact/gui/Canvas.py", line 200, in renderContact
p.setBrush(QColor(bbScColor[0], bbScColor[1], bbScColor[2], alpha))
TypeError: arguments did not match any overloaded call:
QColor(Qt.GlobalColor): argument 1 has unexpected type 'int'
QColor(int): too many arguments
QColor(QRgba64): argument 1 has unexpected type 'int'
QColor(Any): too many arguments
QColor(): too many arguments
QColor(int, int, int, alpha: int = 255): argument 4 has unexpected type 'float'
QColor(str): argument 1 has unexpected type 'int'
QColor(Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'int'
Abort trap: 6
RasmusFonseca commented
Sorry .. just to expand, the QT window crashed and this was the exception in the console
maxscheurer commented
Obviously, this bug only occurs when using PyContact on macOS with conda... In this specific case, there seems to be trouble with the initial distance scoring where numpy is giving NaN
s for some reason. I did a quick hot-fix and created a new branch fix-nan, which you can checkout & test on your machine. I will merge it with the develop branch when I have a Linux machine available to test the fix there as well.
RasmusFonseca commented
This works now. Thanks for the help.