stakelink / substrate-payctl

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

RemainingScaleBytesNotEmptyException #8

Closed LukeWheeldon closed 3 years ago

LukeWheeldon commented 3 years ago

I can't figure out what this error means and it's odd as my payctl setup suddenly stopped working about 10 days ago, after working for about twice that time before. Any help appreciated, thanks!

$ payctl -c payctl.conf -r ws://127.0.0.1:9944 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 174, in main                                                  
    cmd_pay(args, config)
  File "/home/user/src/payctl/payctl/payctl.py", line 113, in cmd_pay                                               
    nonce = get_nonce(substrate, config['Defaults'].get('signingaccount'))                                        
  File "/home/user/src/payctl/payctl/utils.py", line 193, in get_nonce                                              
    params=[account]
  File "/home/user/.local/lib/python3.7/site-packages/substrateinterface/base.py", line 1339, in query              
    obj.decode()
  File "/home/user/.local/lib/python3.7/site-packages/scalecodec/base.py", line 387, in decode                      
    raise RemainingScaleBytesNotEmptyException('Current offset: {} / length: {}'.format(self.data.offset, self.data.length))
scalecodec.exceptions.RemainingScaleBytesNotEmptyException: Current offset: 76 / length: 80 
apuigsech commented 3 years ago

Sometimes updates occur on the network that may not be well managed by the library substrateinterface.

I am investigating this issue. Can you share the version of substrateinterface you are using? Can you also upgrade the versión and tell-me if that fix the issue?

Thanks!

LukeWheeldon commented 3 years ago

Upgrading substrate_interface to 0.12.7 seems to have done the trick indeed.

Thanks a lot @apuigsech!