question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decoder class for "sp_weights::weight_v2::Weight" not found

See original GitHub issue

Hello! For some networks, when I try to substrate.get_payment_info(call=call, keypair=test_keypair) it falls down with error: Decoder class for "sp_weights::weight_v2::Weight" not found

Shortest code to reproduce it:

from substrateinterface import SubstrateInterface, Keypair

url = "wss://karura-rpc.dwellir.com"

substrate = SubstrateInterface(url=url)
test_keypair = Keypair.create_from_uri('//Alice')
call = substrate.compose_call(
    call_module='Balances',
    call_function='transfer',
    call_params={
        'dest': test_keypair.ss58_address,
        'value': 0,
    }
)
substrate.get_payment_info(call=call, keypair=test_keypair)

Environment: ❯ python --version Python 3.11.0 substrate-interface==1.4.0

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
arjanzcommented, Dec 2, 2022

Will be available in next release, after merging another feature

1reaction
arjanzcommented, Dec 1, 2022

Otherwise you can try to add a type with that name manually to the type registry, but it needs some knowledge of custom types

Read more comments on GitHub >

github_iconTop Results From Across the Web

Decoder class for "DispatchInfo" not found · Issue #6
Raising this error when trying to decode the event data; Decoder class for "DispatchInfo" not found.
Read more >
Use Circe to decode Normal Class (not case class)
So is it possible to work with normal classes and decode them from json using Circe? ... Yes, it just cant auto-generate the...
Read more >
Codec registry and base classes
Source code: Lib/codecs.py This module defines base classes for standard Python ... Raises a LookupError in case the encoding cannot be found or...
Read more >
CharsetDecoder (Java Platform SE 7 )
A decoder for a specific charset, which is a concrete subclass of this class, need only implement the abstract decodeLoop method, which encapsulates...
Read more >
Encoding and Decoding Custom Types
For example, the Landmark structure can be encoded using both the PropertyListEncoder and JSONEncoder classes, even though Landmark itself contains no code ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found