-
Notifications
You must be signed in to change notification settings - Fork 32
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]: File written with MatNWB fails to open with PyNWB #650
Comments
Hi, I have tried to read the file with both MatNWB and PyNWB (v2.8.1), and both worked. What version of PyNWB do you use? |
@dungscout96 can you comment? |
Oh this is actually this file https://testspeedeegdash.s3.us-east-2.amazonaws.com/sub-002_task-FaceRecognition_eeg.nwb -- I have just imported it in MATLAB and it was fine (it was exported using MATLAB tools). However, it fails in Python. |
Here's the error I'm seeing using pynwb version 2.8.3:
Here's the code I'm running: from pynwb import NWBHDF5IO
with NWBHDF5IO('/Users/dtyoung/Downloads/sub-002_task-FaceRecognition_eeg.nwb', 'r') as io:
nwbfile = io.read() |
Thanks for providing the file and the error trace. I can reproduce this now! @stephprince , Can you weigh in: There is one The
|
Location should be a |
Sorry for the delay! This appears to be a bug related to exporting files from MatNWB. @arnodelorme @dungscout96 Is it an option to re-export the file? I have added a fix in PR #652 and I can notify you when this is merged into main. Alternatively, you can also immediately re-export the file and add a non-empty character vector to the If re-exporting is not an option, you could create a small python function to modify the file in place before reading it with pynwb:
After doing this, there appears to be another problem that blocks reading the file with PyNWB. The NWB file does not have the required property Please let me know if any of these suggestions are helpful or if you need further assistance. |
What happened?
This file saved using the NwbFile object
https://nemar-dev.ucsd.edu/dataexplorer/download?filepath=/expanse/projects/nemar/openneuro/nwb_example_files/sub-005_ieeg.nwb
Can be reimported in MATLAB using the same object. However, it fails to be reimported in Python. @dungscout96, you used the two different Python libraries right? Can you explain further?
Steps to Reproduce
Error Message
Operating System
macOS
Matlab Version
2024b
Code of Conduct
The text was updated successfully, but these errors were encountered: