Closed nandubatchu closed 5 years ago
Yes you're right it's a 404 error with an empty body as the response from Binance Chain. What do you expect to receive? An exception should be raised, and if you catch this exception you would be able to access the status_code as a property of the exception. You can also access the response and request objects from the exception. See the following example:
try:
client.get_account('nosuchaddress')
except BinanceChainAPIException as e:
print(e.status_code)
print(e.response)
print(e.request)
cool. Yes, using as you suggested. Thank you.
Hi @sammchardy ,@nandubatchu
It seems that i have the same issue:
File "/home/anaconda3/envs/crypto/lib/python3.5/site-packages/binance_chain/http.py", line 233 return self._get(f"account/{address}") ^ SyntaxError: invalid syntax
But, i didn't understand how to fix it !
Thanks for your help
@sammchardy I am seeing error on querying with a fresh account with zero balance/transactions. I suppose you are handling 404s opaquely.