Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Coin' object has no attribute 'is_int_coin' #175

Open
CooleRnax opened this issue Aug 31, 2022 · 5 comments
Open

'Coin' object has no attribute 'is_int_coin' #175

CooleRnax opened this issue Aug 31, 2022 · 5 comments

Comments

@CooleRnax
Copy link

CooleRnax commented Aug 31, 2022

  • terra_sdk version: 3.0.1
  • Python version: 3.8.8
  • Operating System: mac

Description

Some of transactions I am trying to decode end up with error 'Coin' object has no attribute 'is_int_coin'

tx

CtMGCpUCCiQvY29zbXdhc20ud2FzbS52MS5Nc2dFeGVjdXRlQ29udHJhY3QS7AEKLHRlcnJhMTZ5Yzc2eGVsbGNybHZsNXU2cnB3dm52cDZxZGs3ODNkY2F6dXBxEkB0ZXJyYTFuc3Vxc2s2a2g1OHVsY3phdHdldjg3dHRxMno2cjNwdXN1bGc5cjI0bWZqMmZ2dHpkNHVxM2V4bjI2Gnp7ImluY3JlYXNlX2FsbG93YW5jZSI6eyJhbW91bnQiOiIxNDU1NjMxNDAiLCJzcGVuZGVyIjoidGVycmExdzU3OXlzanZweDd4eGhja3hld2s4c3lreHo3MGdtNDh3cGN1cnVlbmwyOXJoZTZwNnJhc2xoajBtNiJ9fQq4BAokL2Nvc213YXNtLndhc20udjEuTXNnRXhlY3V0ZUNvbnRyYWN0Eo8ECix0ZXJyYTE2eWM3NnhlbGxjcmx2bDV1NnJwd3ZudnA2cWRrNzgzZGNhenVwcRJAdGVycmExdzU3OXlzanZweDd4eGhja3hld2s4c3lreHo3MGdtNDh3cGN1cnVlbmwyOXJoZTZwNnJhc2xoajBtNhrLAnsicHJvdmlkZV9saXF1aWRpdHkiOnsiYXNzZXRzIjpbeyJhbW91bnQiOiIxNDU1NjMxNDAiLCJpbmZvIjp7InRva2VuIjp7ImNvbnRyYWN0X2FkZHIiOiJ0ZXJyYTFuc3Vxc2s2a2g1OHVsY3phdHdldjg3dHRxMno2cjNwdXN1bGc5cjI0bWZqMmZ2dHpkNHVxM2V4bjI2In19fSx7ImFtb3VudCI6IjU1MzA0OTIiLCJpbmZvIjp7Im5hdGl2ZV90b2tlbiI6eyJkZW5vbSI6ImliYy9CMzUwNEUwOTI0NTZCQTYxOENDMjhBQzY3MUE3MUZCMDhDNkNBMEZEMEJFN0M4QTVCNUEzRTJERDkzM0NDOUU0In19fV0sImF1dG9fc3Rha2UiOnRydWUsInNsaXBwYWdlX3RvbGVyYW5jZSI6IjAuMDIifX0qTwpEaWJjL0IzNTA0RTA5MjQ1NkJBNjE4Q0MyOEFDNjcxQTcxRkIwOEM2Q0EwRkQwQkU3QzhBNUI1QTNFMkREOTMzQ0M5RTQSBzU1MzA0OTISaQpQCkYKHy9jb3Ntb3MuY3J5cHRvLnNlY3AyNTZrMS5QdWJLZXkSIwohA/qGM1GiJ77FhiJA6d9wKO38HNA+fUqG2eu6QkOcXh0yEgQKAggBGAYSFQoPCgV1bHVuYRIGMTg0MDIxELTwShpAP09JN/bSHMzWUmn91SC7za81bGBNNw5ffJvCISt2u4xGWbpwyK1vds9Ptudqd69/GuaLQDM42Xb6IGY4mcaVJA==

What I Did

tx = await terra.tx.decode(tx)
@CooleRnax
Copy link
Author

CooleRnax commented Aug 31, 2022

Got another error during terra.tx.decode(tx):

<class 'TypeError'>
Error Info: Parser must be a string or character stream, not datetime
tx = 'CucBCuQBCh4vY29zbW9zLmF1dGh6LnYxYmV0YTEuTXNnR3JhbnQSwQEKLHRlcnJhMWhram5hejUydWs1bDBoYXQ0c3hyeTJ2NXd1cXo4a2Nta2N0cHp3Eix0ZXJyYTF5eTQ4NGhsc21ocDZ1bGM3NjRzZmFxeWZwM3V5cWc1ZWQ4N2hzdhpjClMKKi9jb3Ntb3MuYXV0aHoudjFiZXRhMS5HZW5lcmljQXV0aG9yaXphdGlvbhIlCiMvY29zbW9zLnN0YWtpbmcudjFiZXRhMS5Nc2dEZWxlZ2F0ZRIMCLmU0MUGEMDTz4QDEmgKUApGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQMICQWRMTn90ggekZFpKCdY2GEbRoigaakkMiNkHoJwthIECgIIfxgFEhQKDgoFdWx1bmESBTE4MDAwEMCpBxpA2BxH+CCbG28jYo9wCm4HMmJoAFsfDq/DvQWzOiDmNshurjydYAI0GlbFsQz77EtpA1WKEOy7UMWyLxGkC/wRQw=='

@JSHan94
Copy link
Contributor

JSHan94 commented Sep 6, 2022

@CooleRnax Could you show me your full code?

@JSHan94 JSHan94 self-assigned this Sep 6, 2022
@CooleRnax
Copy link
Author

@JSHan94 here is full code

session = aiohttp.ClientSession()
url = 'http://NODE:TENDERMINT_PORT/unconfirmed_txs'
params = {'limit': 100}
while True:
    r = await session.get(url, params=params)
    if r.status == 200:
        txs = json.loads(await r.text())['result']['txs']
        for tx in txs:
            tx = await terra.tx.decode(tx)

@JSHan94 JSHan94 removed their assignment Sep 23, 2022
@Vritra4
Copy link
Contributor

Vritra4 commented Sep 23, 2022

for classic network? or 2.0?

@CooleRnax
Copy link
Author

@Vritra4 2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants