terra-money / terra.py

Python SDK for Terra

Home Page:https://terra-money.github.io/terra.py/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two decode errors

CWDT250 opened this issue · comments

  • terra_sdk version: 2.0.6
  • Python version: 3.8
  • Operating System:

Description

Getting 2 errors when decode tx.

Block: 7435984
TX hash: 04d1c4cca88d90d2dd81d36ef433d318401190ef1c55a7685412ea0c1e9b1a5d
The error is:
File "/opt/venv/lib/python3.8/site-packages/terra_sdk/core/public_key.py", line 164, in from_proto
return cls(key=proto.key)
File "/opt/venv/lib/python3.8/site-packages/betterproto/init.py", line 688, in getattribute
value = super().getattribute(name)
AttributeError: 'Any' object has no attribute 'key'

When decode MsgCreateValidator type transaction.

Block: 7435832
TX hash: 4cf0c4412a0ad5ab5f16eb29d131ebe90a79b79ff3c9911b3b9c536f2d6f8166
The error is:
File "/opt/venv/lib/python3.8/site-packages/terra_sdk/util/base.py", line 53, in unpack_any
return tableproto.type_url
File "/opt/venv/lib/python3.8/site-packages/terra_sdk/core/staking/msgs.py", line 324, in from_proto
description=Description.from_proto(proto.description),
AttributeError: type object 'Description' has no attribute 'from_proto'

Have you tried the latest commit?

Yes, i got it after #135 , also catch two new errors:

Block: 7436760
TX hash: c37829927f9a15977b20c04bca0115cd91526d2bed3b60320e37aabeb2830977
Type: MsgSubmitProposal

File "/opt/venv/lib/python3.8/site-packages/terra_sdk/util/base.py", line 42, in from_proto
return tableproto.type_url
File "/opt/venv/lib/python3.8/site-packages/terra_sdk/core/gov/proposals.py", line 51, in from_proto
title=proto.title,
File "/opt/venv/lib/python3.8/site-packages/betterproto/init.py", line 688, in getattribute
value = super().getattribute(name)
AttributeError: 'Any' object has no attribute 'title'

Block: 7437989
TX hash: d9159e37acf4f9457a71fd2d01e18443aa4f7bf6144cc041db07a428ce4fac4d
Type: MsgWithdrawDelegationReward

File "/opt/venv/lib/python3.8/site-packages/terra_sdk/util/base.py", line 53, in unpack_any
return tableproto.type_url
File "/opt/venv/lib/python3.8/site-packages/terra_sdk/core/distribution/msgs.py", line 143, in from_proto
delegator_address=data["delegator_address"],
TypeError: 'MsgWithdrawDelegatorReward' object is not subscriptable