-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Bug]: Container.__read_io not found if ContainerSubclass.__init__ raises error #913
Comments
|
@rly Would you like to elaborate on this further? The PR blocks allensdk from using the latest versions because they create breaking changes. Until those breaking changes are resolved, please use the versions indicated in the pyproject.toml file in that PR. |
@mikejhuang Apologies! I read your PR too hastily and thought that it was referencing a similar issue to the one described here, but it is different. (If it was the same, I would have prioritized resolving this issue more than otherwise.) We would like to help allensdk use the latest versions of pynwb and hdmf while also catching any accidental breaking changes made by releases. Please let us know if something changed in hdmf 3.7.0 that creates issues. |
@rly No problem! We would appreciate your help to resolve the hdmf breakage issues. Here's an example of a failed test that happens with hdmf=>3.5.0.
|
What happened?
Given a subclass of
AbstractContainer
calledContainerSubclass
, ifContainerSubclass.__init__
raises an error, thenAbstractContainer.__read_io
will not be initialized. During the error handling process, apparently__del__
is called on the partially initializedContainerSubclass
object. That results in anAttributeError
that__read_io
does not exist. This exception is ignored, but we should avoid this by checking to see whether it exists before deleting it.Steps to Reproduce
Traceback
No response
Operating System
macOS
Python Executable
Conda
Python Version
3.11
Package Versions
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: