slimcoin-project / pacli

Simple CLI PeerAssets client (extended version).
GNU General Public License v3.0
0 stars 0 forks source link

token spawn -h #137

Open buhtignew opened 2 months ago

buhtignew commented 2 months ago

As required by you here I've begin looking into token spawn command. To do so I've run token spawn -h and got the following error:

  File "~/.local/bin/pacli", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "~/.local/lib/python3.12/site-packages/pacli/__main__.py", line 479, in main
    fire.Fire({
  File "~/.local/lib/python3.12/site-packages/fire/core.py", line 143, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/fire/core.py", line 477, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
                                ^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/fire/core.py", line 693, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/pacli/__main__.py", line 175, in spawn
    deck = self.__new(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^
TypeError: Deck.__new() got an unexpected keyword argument 'h'

I'm getting the same error if I run deck spawn -h as well.

The deck spawn/token spawn provides the following error message:

  File "~/.local/bin/pacli", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "~/.local/lib/python3.12/site-packages/pacli/__main__.py", line 479, in main
    fire.Fire({
  File "~/.local/lib/python3.12/site-packages/fire/core.py", line 143, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/fire/core.py", line 477, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
                                ^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/fire/core.py", line 693, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/pacli/__main__.py", line 175, in spawn
    deck = self.__new(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^
TypeError: Deck.__new() missing 3 required positional arguments: 'name', 'number_of_decimals', and 'issue_mode'

_ Or you meant I should test podtoken deck_spawn and attoken deck_spawn commands instead?

d5000 commented 1 month ago

Taken note of this bug. It's only present on the original (vanilla) command, but of course the help function in theory should work in this original too. I'll put this on hold as the other vanilla commands, I'll look at this when I do the unittests for pacli.

Or you meant I should test podtoken deck_spawn and attoken deck_spawn commands instead?

This was in reality my intention - spawning PoB (and later PoD) tokens would be more important to look at. It has been tested several times and not much has changed, but more to see if the "lifecycle" of PoB tokens is working well and is reasonably intuitive from the start.