You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RemainingScaleBytesNotEmptyException for Kilt Spiritnet #412
scalecodec.exceptions.RemainingScaleBytesNotEmptyException: Decoding <U32> - Current offset: 4 / length: 8
Some trace in my application:
substrateinterface/base.py", line 1593, in create_signed_extrinsic
nonce = self.get_account_nonce(keypair.ss58_address) or 0
substrateinterface/base.py", line 1428, in get_account_nonce
nonce_obj = self.runtime_call("AccountNonceApi", "account_nonce", [account_address])
substrateinterface/base.py", line 1283, in runtime_call
result_obj.decode(ScaleBytes(result_data['result']), check_remaining=self.config.get('strict_scale_decode'))
scalecodec/base.py", line 888, in decode
raise RemainingScaleBytesNotEmptyException(
scalecodec.exceptions.RemainingScaleBytesNotEmptyException: Decoding <U32> - Current offset: 4 / length: 8
Hello @Maharacha
This week JAMdotTechnologies has announced to take up stewardship of Polkascan's Python libraries for the Polkadot ecosystem.
Our current focus is on delivering our Python implementation of JAM Protocol. However as we expect major delivery milestones for JAM later this year, we will be shifting our attention more towards user/developer facing libraries, such as this library (PyPolkadotSDK).
We will schedule some timeboxed resources this week to check if we can help you with this issue. Thank you for understanding.
@Maharacha It seems it is a type registry related issue. To determine the account nonce, the Runtime API AccountNonceApi.account_nonce() is being called. Runtime API calls are still manually administered in the library atm, type definition updates are not automatically applied (yet).
After some debugging I found out Index is not a u32 but a u64 for Kilt.
As a workaround until runtime APIs are included in the metadata (It was under development in Substrate but didn't check progress of this for a while to be honest), you can add the following:
@Maharacha It seems it is a type registry related issue. To determine the account nonce, the Runtime API AccountNonceApi.account_nonce() is being called. Runtime API calls are still manually administered in the library atm, type definition updates are not automatically applied (yet).
After some debugging I found out Index is not a u32 but a u64 for Kilt.
As a workaround until runtime APIs are included in the metadata (It was under development in Substrate but didn't check progress of this for a while to be honest), you can add the following:
Activity
Maharacha commentedon Apr 1, 2025
Is this repo still maintained? @arjanz ?
emielsebastiaan commentedon Apr 2, 2025
Hello @Maharacha
This week JAMdotTechnologies has announced to take up stewardship of Polkascan's Python libraries for the Polkadot ecosystem.
Our current focus is on delivering our Python implementation of JAM Protocol. However as we expect major delivery milestones for JAM later this year, we will be shifting our attention more towards user/developer facing libraries, such as this library (PyPolkadotSDK).
We will schedule some timeboxed resources this week to check if we can help you with this issue. Thank you for understanding.
arjanz commentedon Apr 7, 2025
@Maharacha It seems it is a type registry related issue. To determine the account nonce, the Runtime API
AccountNonceApi.account_nonce()is being called. Runtime API calls are still manually administered in the library atm, type definition updates are not automatically applied (yet).After some debugging I found out
Indexis not au32but au64for Kilt.As a workaround until runtime APIs are included in the metadata (It was under development in Substrate but didn't check progress of this for a while to be honest), you can add the following:
Maharacha commentedon Apr 9, 2025
Thanks, I will try this!
Maharacha commentedon Apr 14, 2025
@arjanz I just tried the work around and it works well! You want to keep the issue open for the actual fix?