polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
240 stars 116 forks source link

"IndexError: list index out of range" when using latest polkadot node version v0.9.11 #137

Closed shedfull closed 2 years ago

shedfull commented 3 years ago

Can no longer submit transfer extrinisics as per the examples using the latest polkadot node running in -dev mode

File "/home/brian/pyenvs/app/lib/python3.8/site-packages/scalecodec/types.py", line 1878, in get_pallet_by_index
  return self.pallets[index]
IndexError: list index out of range

The code all works fine when running with polkadot node version v0.9.10

stolpa4 commented 3 years ago

Seem to be connected somehow with: https://github.com/polkascan/py-scale-codec/issues/53

arjanz commented 3 years ago

A recent change was that pallet index is now explicitly stored in the pallet, in stead of the index of the Vec.

Released in package https://github.com/polkascan/py-scale-codec/releases/tag/v1.0.6 , so you can manually upgrade scalecodec to 1.0.6

arjanz commented 3 years ago

Fixes released in https://github.com/polkascan/py-substrate-interface/releases/tag/v1.0.3