TypeError exception message does not display erroneous value #2665
Labels
help:wanted
Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
needs:reproducer
ideally a failing test marked as xfail. If that is not possible exact instructions to reproduce
Issue
After upgrading to 4.0, we are getting the following exceptions in our build pipeline:
We cannot reproduce the issue locally, else we would have more debugging tools and options.
The exception message is not showing us what the incorrect value is. While it appears that it might be the empty string, an empty string is included in the VALID_BOOL list, and so should not raise the TypeError. So we suspect some other value, but since it is non-printing, we cannot diagnose.
I am submitting a PR to add
!r
andrepr()
calls in theto_bool
method to make the exception message clearer, so that we can better diagnose the underlying issue.The text was updated successfully, but these errors were encountered: