Skip to content
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

NWBFile properties not being saved #1046

Closed
rly opened this issue Aug 20, 2019 · 1 comment · Fixed by #1048
Closed

NWBFile properties not being saved #1046

rly opened this issue Aug 20, 2019 · 1 comment · Fixed by #1048
Assignees
Labels
category: bug errors in the code or code behavior priority: critical impacts proper operation or use of core function of NWB or the software

Comments

@rly
Copy link
Contributor

rly commented Aug 20, 2019

Properties of NWBFile are not being saved to disk.
We also need a roundtrip test on this.

from pynwb import NWBFile, NWBHDF5IO
from datetime import datetime

nwbfile = NWBFile(session_description='ADDME',
                  identifier='ADDME',
                  session_start_time=datetime.now().astimezone(),
                  experimenter=('ADDME1', 'ADDME2'),
                  related_publications='ADDME',
                  institution='ADDME')

with NWBHDF5IO('test_file.nwb', 'w') as io:
    io.write(nwbfile)

with NWBHDF5IO('test_file.nwb', 'r') as io:
    read_nwbfile = io.read()
    print(read_nwbfile)
    print(read_nwbfile.experimenter)
    print(read_nwbfile.related_publications)
    print(read_nwbfile.institution)
    # these are also not present when inspecting the file using HDFView
@rly rly added category: bug errors in the code or code behavior priority: critical impacts proper operation or use of core function of NWB or the software labels Aug 20, 2019
@rly rly self-assigned this Aug 20, 2019
@rly
Copy link
Contributor Author

rly commented Aug 20, 2019

This is due to the removal of automatic mapping of NWBFile group "general" dataset x to NWBFile.x.
hdmf-dev/hdmf#130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior priority: critical impacts proper operation or use of core function of NWB or the software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant