andelf / tronpy

TRON Python Client Library.
MIT License
204 stars 96 forks source link

fix: empty descriptions keys in assets #42

Closed viacheslav-sabadash closed 2 years ago

viacheslav-sabadash commented 2 years ago

In some cases for some assets code client.list_assets() where client = Tron(network='nile') raised an Error:

File "/Users/vyacheslav/TronTest/venv/lib/python3.9/site-packages/tronpy/tron.py", line 763, in list_assets
    asset["description"] = bytes.fromhex(asset["description"]).decode("utf8", "replace")
KeyError: 'description'