etherscan-python icon indicating copy to clipboard operation
etherscan-python copied to clipboard

Assert Behavior on scraping wallet without transactions

Open XenonOrion opened this issue 3 years ago • 1 comments

in commit fb697e1 the following behavior was introduced:

# etherscan/utils/parsing.py 
assert status, f"{result} -- {message}"

to replace the UserWarning behavior:

#etherscan/utils/parsing.py 
warnings.warn(f"{result} -- {message}")

This has made the event of scraping an empty address, "aggressive" and forces downstream applications to catch a generic AssertionError, for this---in my case common---scenario. imho, getting an empty list back in case no records exist, is completely valid behavior?

Could you elaborate on why this behavior was chosen, and this change was made?

XenonOrion avatar Jan 31 '22 12:01 XenonOrion

Thanks for reporting this issue, we are on it :)

github-actions[bot] avatar Jan 31 '22 12:01 github-actions[bot]