gaasedelen/lighthouse

0.9.2 version argument 1 has unexpected type 'float' error

johdcmlaker2000 opened this issue · 4 comments

I have IDA 7.7, python 3.10 and last plugin version 0.9.2. How can i fix this?

Traceback (most recent call last):
  File "C:\1\IDA Pro 7.7\python\3\ida_idaapi.py", line 580, in IDAPython_ExecScript
    exec(code, g)
  File "C:\1/IDA Pro 7.7/plugins/lighthouse_plugin.py", line 1, in <module>
    from lighthouse.util.log import logging_started, start_logging
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\__init__.py", line 3, in <module>
    from .debug import *
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\debug.py", line 6, in <module>
    from .log import lmsg
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\log.py", line 6, in <module>
    from .disassembler import disassembler
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\disassembler\__init__.py", line 20, in <module>
    disassembler = IDACoreAPI()
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\disassembler\ida_api.py", line 64, in __init__
    super(IDACoreAPI, self).__init__()
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\disassembler\api.py", line 43, in __init__
    self._waitbox = WaitBox("Please wait...")
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\qt\waitbox.py", line 27, in __init__
    self._ui_init()
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\qt\waitbox.py", line 71, in _ui_init
    self._ui_layout()
  File "C:\1/IDA Pro 7.7/plugins\lighthouse\util\qt\waitbox.py", line 89, in _ui_layout
    v_layout.setSpacing(self._dpi_scale*3)
TypeError: setSpacing(self, int): argument 1 has unexpected type 'float'

also the same problem with the tenet plugin

Thanks for the heads up, I'm guessing something changed about the Qt release in the IDA 7.7 builds.

Are you on IDA 7.7 or 7.7 SP1?

I'll try to get a fix out for this in the next day or two, but a 'workaround' would probably be to wrap the _dpi_scale assignment with an int(...):

self._dpi_scale = int(get_dpi_scale()*5.0)

It's possible this issue may manifest in other places. So I'll have to take a closer look a bit later.

Are you on IDA 7.7 or 7.7 SP1?

I'm on IDA 7.7. Thanks,
with the "int()" fix there is no errors on startup, but yes there are other places with a similar errors

  QColor(int, int, int, alpha: int = 255): argument 1 has unexpected type 'float'
  QColor(str): argument 1 has unexpected type 'float'
  QColor(Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'float'```

Should be fixed with the PR, I've also flipped the 'develop' branch to be the default branch on Git for the meantime.