Edit some ValueError() messages for more clarity #2146
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
A few of the error messages were confusing
How was it fixed?
With additional formatting and clarification
Todo:
Background
Errors such as "Cannot set data in estimateGas transaction" make me think that estimateGas() failed to set some data values in transaction provided to it. While instead what it means is that I myself, as an operator, am not supposed to set transaction['data'] field. And should leave it blank. This might be obvious to those experienced with web3.py, but it's extremely confusing to me.
Same with the generic ValueError at line 693. It took me an extra hour to understand what the error was actually saying, because of the format it was in: "cannot set to in estimateGas transaction", for example. Just how the hell is one supposed to understand that line? It is VERY confusing.
Cute Animal Picture