AllenInstitute / AllenInstitute/bmtk
save_nodes fails to overwrite (nodes file already open)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 335
- Forks
- 102
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 6
Description
When trying to modify and re-run a network interactively in ipython/jupyter, NetworkBuilder.save_nodes fails with the message (from h5py): IOError: Unable to create file (unable to truncate a file which is already open)
It seems like the file is left open on loading the network when BioNetwork.from_config is called, maybe in SonataNodes.load()?. Not sure if that's intentional, or could be fixed?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by loading a network through BioNetwork.from_config in IPython or Jupyter, then calling NetworkBuilder.save_nodes. Inspect SonataNodes.load() first to trace whether the nodes file remains open, and confirm done when the loaded network can be modified and saved again without the h5py truncation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100