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

writing nwb file with position data fails #34

Closed
ajtritt opened this issue Jun 2, 2017 · 4 comments
Closed

writing nwb file with position data fails #34

ajtritt opened this issue Jun 2, 2017 · 4 comments
Labels
category: bug errors in the code or code behavior priority: high impacts proper operation or use of feature important to most users

Comments

@ajtritt
Copy link
Member

ajtritt commented Jun 2, 2017

Originally reported by: Loren Frank (Bitbucket: lmfrnk, GitHub: Unknown)


Traceback (most recent call last):
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 280, in scalar_fill
dset = parent.require_dataset(name, data=data, shape=None, dtype=dtype)
File "/Users/loren/anaconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 136, in require_dataset
raise TypeError("Shapes do not match (existing %s vs new %s)" % (dset.shape, shape))
TypeError: Shapes do not match (existing () vs new None)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/loren/Src/NWB/franklabnwb/convert_nspike.py", line 486, in
io.write(nwbf)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 231, in func_call
return func(self, **parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/io.py", line 25, in write
self.write_builder(f_builder)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 231, in func_call
return func(self, **parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 116, in write_builder
write_group(self.__file, name, gbldr.groups, gbldr.datasets, gbldr.attributes, gbldr.links)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 157, in write_group
builder.links)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 157, in write_group
builder.links)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 157, in write_group
builder.links)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 164, in write_group
builder.get('attributes'))
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 251, in write_dataset
dset = scalar_fill(parent, name, data)
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 282, in scalar_fill
raise Exception("Could not create scalar dataset %s in %s" % (name, parent.name)) from exc
Exception: Could not create scalar dataset reference_frame in /processing/Behavior Module/Position/Position Data


@ajtritt
Copy link
Member Author

ajtritt commented Jun 13, 2017

Original comment by Andrew Tritt (Bitbucket: ajtritt, GitHub: ajtritt):


Hi Loren,

This looks like a problem when trying to create a file that already exists. I added some logic to deal with this. Please update and let me know if you still get this error.

Andrew

@ajtritt
Copy link
Member Author

ajtritt commented Jun 13, 2017

Original comment by Loren Frank (Bitbucket: lmfrnk, GitHub: Unknown):


Great; I’ll test it out as soon as I can and get back to you…

Loren

Loren M. Frank

Professor
Howard Hughes Medical Institute
Kavli Institute for Fundamental Neuroscience
Department of Physiology
University of California, San Francisco
Office Phone: 415-502-7357

@ajtritt
Copy link
Member Author

ajtritt commented Jun 22, 2017

Original comment by Andrew Tritt (Bitbucket: ajtritt, GitHub: ajtritt):


From Loren:

Traceback (most recent call last):
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 327, in list_fill
data_dtype = __get_type(data)
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 221, in __get_type
raise ValueError('cannot determine type for empty data')
ValueError: cannot determine type for empty data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/loren/Src/NWB/franklabnwb/convert_nspike.py", line 492, in
io.write(nwbf)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 231, in func_call
return func(self, **parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/io.py", line 25, in write
self.write_builder(f_builder)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 231, in func_call
return func(self, **parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 120, in write_builder
write_group(self.__file, name, gbldr.groups, gbldr.datasets, gbldr.attributes, gbldr.links)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 161, in write_group
builder.links)
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 168, in write_group
builder.get('attributes'))
File "/Users/loren/Src/NWB/pynwb/src/form/utils.py", line 238, in func_call
return func(**parsed['args'])
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 261, in write_dataset
dset = list_fill(parent, name, data)
File "/Users/loren/Src/NWB/pynwb/src/form/backends/hdf5/h5tools.py", line 329, in list_fill
raise Exception('cannot add %s to %s - could not determine type' % (name, parent.name)) from exc
Exception: cannot add tags to /epochs/day 3 - could not determine type

Process finished with exit code 1

@ajtritt
Copy link
Member Author

ajtritt commented Jun 28, 2017

Original comment by Andrew Tritt (Bitbucket: ajtritt, GitHub: ajtritt):


Merged in issue_34 (pull request #67)

fixing issue #34 and issue #35

@ajtritt ajtritt added priority: high impacts proper operation or use of feature important to most users category: bug errors in the code or code behavior labels Aug 3, 2017
@ajtritt ajtritt closed this as completed Aug 3, 2017
ajtritt added a commit that referenced this issue Aug 9, 2017
ajtritt added a commit that referenced this issue Aug 9, 2017
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: high impacts proper operation or use of feature important to most users
Projects
None yet
Development

No branches or pull requests

1 participant