andelf / tronpy

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

Error : tronpy.exceptions.AddressNotFound: account not found on-chain #2

Closed itsAPK closed 4 years ago

itsAPK commented 4 years ago

Got error tronpy.exceptions.AddressNotFound: account not found on-chain When I try to get Balance of address.

Code :

from tronpy import Tron

from pprint import pprint

client = Tron(network='nile')

address=client.generate_address()['base58check_address']

pprint(client.get_account_balance(address))

Traceback :

Traceback (most recent call last):
  File "tron.py", line 9, in <module>
    pprint(client.get_account_balance(address))
  File "G:\BOT\tipbot\env\lib\site-packages\tronpy\tron.py", line 517, in get_account_balance
    info = self.get_account(addr)
  File "G:\BOT\tipbot\env\lib\site-packages\tronpy\tron.py", line 501, in get_account
    raise AddressNotFound("account not found on-chain")
tronpy.exceptions.AddressNotFound: account not found on-chain
andelf commented 4 years ago

You must use a faucet to get TRX and activate your account on-chian.

Faucet Page: https://nileex.io/join/getJoinPage