tenet icon indicating copy to clipboard operation
tenet copied to clipboard

Error: `argument 1 has unexpected type 'float'`

Open donghyunlee00 opened this issue 2 years ago • 13 comments

Errors argument 1 has unexpected type 'float' occurred in Qt functions.

image

donghyunlee00 avatar May 16 '22 02:05 donghyunlee00

You can convert self._dpi_scale to int in waitbox.py solving this problem. :( Afterward I find so many type problem....

wr-web avatar Sep 14 '22 03:09 wr-web

I ended up solving this by replacing every self._dpi_scale with a fixed value in waitbox.py. Is there any clean way to fix this?

Surprised to see this worked as-is on OSX but not on Windows 🙃

Edit: Ended up doing self._dpi_scale = int(get_dpi_scale()*5.0) at waitbox.py:65, seems to work fine now

ferib avatar May 06 '23 14:05 ferib

I am still not able to get it to fully work on my end, I tried your fork @ferib but I get the following errors:

Screenshot 2023-05-14 at 1 52 57 AM

Help is much appreciated, please and thank you!

nasroabd avatar May 14 '23 00:05 nasroabd

Hey, I had some issues with my IDA Pro 8.1 and the Python version I used as the plugin made my IDA crash. I just upgraded to 8.2 and I can see those errors as well now 🤔

ferib avatar May 14 '23 10:05 ferib

@ferib on which version of IDA and Python you got it to work previously?

nasroabd avatar May 14 '23 10:05 nasroabd

I used IDA 8.1 with Python 3.11.x, I was told to upgrade to 8.2.

I am currently looking in the 'new' errors I get in 8.2

ferib avatar May 14 '23 10:05 ferib

yeah same I am using IDA 8.2, thank you for looking into it!

please keep me posted, much appreciated!

nasroabd avatar May 14 '23 10:05 nasroabd

@MrNasro I added some more int(), I cba to figure out which place is best so I took wherever IDA started to complain.

https://github.com/gaasedelen/tenet/commit/2bb443afd00da40b2905afc4c7c965849a298ac4

Not sure why but when clicking around in the timeline window I crash randomly for some reason 🤔

ferib avatar May 14 '23 11:05 ferib

yeah I still see some errors and it does not seem to be functioning correctly :/ I wonder if it is the version of Python or IDA, in the original repo it does not mention which versions they got it to work on.

nasroabd avatar May 14 '23 11:05 nasroabd

yeah I still see some errors and it does not seem to be functioning correctly :/ I wonder if it is the version of Python or IDA, in the original repo it does not mention which versions they got it to work on.

@MrNasro I also have the same problems and only python under 3.10 works fine on me without any code patch. (exactly, 3.9.11) This issue seems to be related to the deprecated implicit conversion after python 3.10.

J-jaeyoung avatar Jun 03 '23 07:06 J-jaeyoung

I get the same error in IDA 8.3 with Python 3.10:

C:\Users\flare\AppData\Roaming\Hex-Rays\IDA Pro\plugins\tenet_plugin.py: setSpacing(self, int): argument 1 has unexpected type 'float'

Ana06 avatar Apr 30 '24 08:04 Ana06

I get the same error in IDA 8.3 with Python 3.10:

Python 3.9.xx will solve the issue

J-jaeyoung avatar Apr 30 '24 09:04 J-jaeyoung

@J-jaeyoung

Python 3.9.xx will solve the issue

Yes, as you mentioned before the issue looks related to the deprecated implicit conversion.

I would like to add this plugin to FLARE-VM and we are using Python 3.10. Decreasing the Python version affects other libraries and plugins, so this is not an option and we are rather looking into increasing the Python version. Note also there seem to be a bug in the latest version of IDA Pro (8.4) and IDApython only runs with Python 3.12: https://github.com/mandiant/VM-Packages/issues/1017 So I hope @gaasedelen finds time to fix the issue (or review the PR that appear to fix the issue: https://github.com/gaasedelen/tenet/pull/18). :wink:

Ana06 avatar Apr 30 '24 09:04 Ana06