corpetty / py-etherscan-api

Python bindings to the Etherscan.io API
MIT License
510 stars 247 forks source link

get_all_transactions leads to error in connect #34

Open rickyktan opened 6 years ago

rickyktan commented 6 years ago

I have been trying to collect and plot all contributions that were sent to a crowdsale address (ZRX as example)

Sending a request using get_all_transactions function seems to be working (i.e. transactions are added and pages are being counted and added) until the Etherscan API returns the page with an empty response

{"status":"0","message":"No transactions found","result":[]}

This triggers an error in the connect function

corpetty commented 5 years ago

This will be fixed by #8 . I'll be working on this soon as I've picked this project up as part of another project I'm working on.

MarcelBeining commented 5 years ago

any updates on this? ran into the same problem. guess the solution is quite simple by changing line 92ff in accounts.py to something like

try: 
    req = self.connect()
except EmptyResponse:
    print(
                    "Total number of transactions: {}".format(len(trans_list)))
    self.page = ''
    return trans_list
corpetty commented 5 years ago

Was out of town on holiday. Will pick this back up this week.

MarekPas commented 4 years ago

Problem still not solved: raise EmptyResponse(data.get('message', 'no message')) etherscan.client.EmptyResponse: <Err: No transactions found>