calebstewart / python-htb

A Python API for Hack the Box platform interaction
63 stars 13 forks source link

Unable to run python-htb #9

Closed lukeberry99 closed 3 years ago

lukeberry99 commented 3 years ago

I've installed using the following

python3 -m pip install git+https://github.com/calebstewart/python-htb

Unfortunately I can't seem to run htb at all, I get the following error:

(kali㉿kali)-[~] $ htb       
Traceback (most recent call last):
  File "/home/kali/.local/bin//htb", line 8, in <module>
    sys.exit(main())
  File "/home/kali/.local/lib/python3.9/site-packages/htb/__main__.py", line 1120, in main
    machine_start_parser.add_argument(
  File "/home/kali/.local/lib/python3.9/site-packages/cmd2/argparse_custom.py", line 562, in _add_argument_wrapper
    new_arg = orig_actions_container_add_argument(self, *args, **kwargs)
  File "/usr/lib/python3.9/argparse.py", line 1428, in add_argument
    action = action_class(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'choices_method'

I don't know any python really, so I'm not sure how to fix this. Any ideas on what I can do to get this to work?

Relevant version numbers

(kali㉿kali)-[~] $ python3 --version                                                                                                                                                                                                              1 ⨯
Python 3.9.2

(kali㉿kali)-[~] $ python3 -m pip --version                                             
pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)

Thanks in advance

lukeberry99 commented 3 years ago

I was able to "fix" this by uninstalling the latest cmd2 and instead installing cmd2 1.0.1, I"ll look into getting this package to work with the latest cmd2, it looks like choices_method was removed in the later versions.