jziolkowski / tdm

GUI application to discover and monitor devices flashed with https://github.com/arendst/tasmota

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash in Util/models.py - argument 2 has unexpected type 'float'

mkyral opened this issue · comments

I'm on Gentoo, PyQt5-5.15.6 and tdm is crashing when loading list of devices on

$ python tdmgr.py 
Traceback (most recent call last):
  File "/home/marian/programy/tdm/Util/models.py", line 285, in paint
    p.drawPixmap(option.rect.x() + 2, option.rect.y() + px_y, px.scaled(24, 24))
TypeError: arguments did not match any overloaded call:
  drawPixmap(self, QRectF, QPixmap, QRectF): argument 1 has unexpected type 'int'
  drawPixmap(self, QRect, QPixmap, QRect): argument 1 has unexpected type 'int'
  drawPixmap(self, Union[QPointF, QPoint], QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, QPoint, QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, QRect, QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, int, int, QPixmap): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, int, int, QPixmap): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, int, int, QPixmap, int, int, int, int): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, QPixmap, int, int, int, int): argument 2 has unexpected type 'float'
  drawPixmap(self, Union[QPointF, QPoint], QPixmap, QRectF): argument 1 has unexpected type 'int'
  drawPixmap(self, QPoint, QPixmap, QRect): argument 1 has unexpected type 'int'
Neúspěšně ukončen (SIGABRT)

The result of px_y is not integer.

px_y = (option.rect.height() - 24) / 2

This issue is already present here #176

merged and released