nwb file returned and viewed from class error #80
-
I am creating a class and calling the class from a Jupyter notebook. I am noticing an error when trying to read the nwb file. If I run the code in a .py file, no error is produced and if I run print(nwbFile) instead of nwbFile, no error is produced. I am running pynwb version 2.6.0. Interestingly, the contents of the file does still get printed out (as shown in the error message below), but I cannot interact with it by drilling down into the fields. Additionally, any call I make to the file causes the error. For example, nwbFile.units, would result in the same error, but it would still print out the contents of the units table. This form of printing isn't useful and removes the appeal of using the Jupyter Notebook to view the data. Any thoughts on what the cause of the error is and how to fix it? I'd like to be able to view the file by drilling into it.
If I run these lines in the Jupyter Notebook directly instead of calling from the class, I do not get any error. Therefore I suspect there is an issue with loading the file from a class in a Jupyter Notebook.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
The
io
needs to stay open when accessing data (which a printout command will do) in thenwbfile
it was read from; so I'd try removingio.close()