Closed peta909 closed 3 years ago
Hi, thanks for posting the issue. Would be awesome if you could hop onto the discord where we could discuss about it in more detail. You can find an invite in the readme. Thanks in advance.
hashdb.py: unsupported operand type(s) for |: 'type' and 'type'
Traceback (most recent call last):
File "[redacted]/ida_idaapi.py", line 616, in IDAPython_ExecScript
exec(code, g)
File "hashdb.py", line 88, in <module>
HASHDB_REQUEST_TIMEOUT: int | float = 15 # Limit to 15 seconds
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Under:
Python 3.8.2 (default, Jun 8 2021, 11:59:35)
[Clang 12.0.5 (clang-1205.0.22.11)]
IDAPython v7.4.0 final (serial 0) (c) The IDAPython Team <idapython@googlegroups.com>
Version 7.6.210427 macOS arm64 (32-bit address size)
Same issue as above... earlier Python versions don't support union. We need to support these versions 3.8 isn't that old and I think we will find a lot of ppl not using the bleeding edge....
Workaround: for now we can use v1.6.0 without any significant feature impacts but we should support Py 3.8 going forward.
Resolved with #22
Hi,
Thank you for sharing this fantastic plugin!
I was using hashdb in latest version of ida pro on win 7 x64 python 3.8 the following line of code threw the above error.
HASHDB_REQUEST_TIMEOUT: int | float = 15 # Limit to 15 seconds
I realised its because python 3.8 doesn't support use of '|' as an Union operator.
I guess the work around is to modify the code to fall back to "Union". as I prefer to work with win 7 and the last of python it supports is 3.8 :(
Just wanted to let you guys know in case someone else faced the same issue.