You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
(one was truncated when the download crashed - I had to find it by size)
Xarray can't convert a dtype. What dtype couldn't it convert? And of what variable? (it was a boolean mask)
And of course there are many more examples. This manifesto has some good advice, but in essence:
Think about the information a new user will need to understand what has gone wrong and fix their code. It's good to be verbose here, because new users need this information most and experienced users won't see it anyway (or might be glad it's there on occasion!).
Report:
The value that was invalid
(or a summary that rules out validity; eg shape and dtype for arrays)
The operation that was attempted
Why the value was invalid in this operation
If possible, what the user can do to fix this
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.
The text was updated successfully, but these errors were encountered:
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 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?(one was truncated when the download crashed - I had to find it by size)
And of course there are many more examples. This manifesto has some good advice, but in essence:
(or a summary that rules out validity; eg shape and dtype for arrays)
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.
The text was updated successfully, but these errors were encountered: