If anybody else is having this error I fixed it by copying all hactool files to the same folder of keys.py.
Using BOOT0.bin to get keys from package1...
Deriving keys...
Traceback (most recent call last):
File "keys.py", line 374, in <module>
stage0_results =...