I've regularly had to debug problems with unusual or slightly broken data - or my misunderstanding of various layers of the software stack -, and I can't be the only one. For example:
open_mfdataset tries to open an invalid file. Which file? Why is it invalid?And of course there are many more examples. This manifesto has some good advice, but in essence:
This is quite an open-ended issue; as well as the code changes it probably requires some process changes to ensure that new errors are equally helpful. Ultimately, the goal is for errors to become a positive aid to learning rather than a frustrating barrier.
Thanks for raising this concern. I think we have been gradually improving the quality of our error messages, but I agree that we still have a large opportunity for improvement.
This also one area where someone inexperienced can have a big impact. Experienced developers are likely to gloss over confusing error messages (or not see them at all) because they already understand what's going on. Any GitHub issues you open when you encounter an error that was not as helpful as possible would be gratefully appreciated.
I've been trying to collect these under the error reporting tag:
https://github.com/pydata/xarray/issues?q=is%3Aopen+is%3Aissue+label%3A%22error+reporting%22
Our contributing guidelines (see https://github.com/pydata/xarray/pull/1485) should make it clear that full code to reproduce is not required for such cases.
Potentially it would also make sense to audit some of our code line by line to check that error messages are as good as possible.
cc @jhamman
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity
If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically
It's at least out of date, and doesn't appear to be helpful, so I'm happy to close this issue.
Most helpful comment
Thanks for raising this concern. I think we have been gradually improving the quality of our error messages, but I agree that we still have a large opportunity for improvement.
This also one area where someone inexperienced can have a big impact. Experienced developers are likely to gloss over confusing error messages (or not see them at all) because they already understand what's going on. Any GitHub issues you open when you encounter an error that was not as helpful as possible would be gratefully appreciated.
I've been trying to collect these under the
error reportingtag:https://github.com/pydata/xarray/issues?q=is%3Aopen+is%3Aissue+label%3A%22error+reporting%22
Our contributing guidelines (see https://github.com/pydata/xarray/pull/1485) should make it clear that full code to reproduce is not required for such cases.
Potentially it would also make sense to audit some of our code line by line to check that error messages are as good as possible.
cc @jhamman