stakelink / substrate-payctl

Simple command line application to control the payouts of Substrate validators (Polkadot and Kusama among others).
MIT License
33 stars 8 forks source link

payctl pay error #2

Closed LukeWheeldon closed 3 years ago

LukeWheeldon commented 3 years ago

payctl list is working fine and displaying both claimed and unclaimed eras.

payctl pay however is throwing the following error:

$ payctl -c payctl.conf pay
Traceback (most recent call last):
  File "/home/user/.local/bin/payctl", line 11, in <module>
    load_entry_point('payctl', 'console_scripts', 'payctl')()
  File "/home/user/src/payctl/payctl/payctl.py", line 168, in main
    cmd_pay(args, config)
  File "/home/user/src/payctl/payctl/payctl.py", line 107, in cmd_pay
    nonce = get_nonce(substrate, config['Defaults'].get('signingaccount'))
  File "/home/user/src/payctl/payctl/utils.py", line 187, in get_nonce
    return account_info.value['nonce']
AttributeError: 'NoneType' object has no attribute 'value'

Update:

This error is thrown if the account configured in payctl.conf does not have enough credit to process the payment. Once the account is topped up, this command works as expected.

apuigsech commented 3 years ago

I am aware error handling is still pretty weak, because I am not handling unexpected situations such as trying to sign a requests with an account without funds.

I will be working in improving reliability on unexpected situations. Thanks for reporting!