When submitting a stake request through the Python substrate-interface library, the extrinsic receipt comes back with the following parameters:
({'Module': {'index': 6, 'error': '0x02000000'}}, {'weight': 558355000, 'class': 'Normal', 'pays_fee': 'Yes'})
Also seen it return from the unbond endpoint with a similar response:
({'Module': {'index': 6, 'error': '0x07000000'}}, {'weight': 1163003000, 'class': 'Normal', 'pays_fee': 'Yes'})
When this map gets passed down through the error handling, it fails with a TypeError because '0x02000000'
is not a valid int index on the map.
Stack trace:
File "/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/eulith_staking_manager/staking/dot/fxn_implementations/substrateCallImplementation.py", line 54, in call
if receipt.is_success:
File "/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/substrateinterface/base.py", line 3305, in is_success
self.process_events()
File "/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/substrateinterface/base.py", line 3204, in process_events
module_error = self.substrate.metadata_decoder.get_module_error(
File "/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/scalecodec/types.py", line 1907, in get_module_error
return module.errors[error_index]
File "/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/scalecodec/base.py", line 790, in __getitem__
return self.value_object[item]
TypeError: list indices must be integers or slices, not str
What does this error code mean, and what is the correct fix to interpret the returned error?
Thank you!