-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raise_hdf5_format_error doesn't work for streams #1938
Comments
No, hold on, I'm wrong, it works all right, it's just that it produces a confusing backtrace:
It looked to me that this as a TypeError, but actually this is just the chaining history I think. So it's not a bug, but I think having a confusing backtrace here is much worse than giving a slightly less friendly error to users with very old files. |
I think the exception chaining is incorrect here at the least, and that might be causing issues in #1882 so I'm reupping this to a bug for now. |
The recently introduced raise_hdf5_format_error can be called on either a path or a file object, but assumes the input is a path.
Since we can't sniff the first few bytes of a file object (it might be an unseekable stream, like a socket) it's pretty questionable whether this functionality is worth it
The text was updated successfully, but these errors were encountered: