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

Error in writing the Preprocessed data #31

Closed
jessierliu opened this issue Jul 29, 2019 · 2 comments
Closed

Error in writing the Preprocessed data #31

jessierliu opened this issue Jul 29, 2019 · 2 comments

Comments

@jessierliu
Copy link
Contributor

Was trying to re-preprocess the data (on a new file with only the raw in it), and got the following error when it was trying to write the processed data:

TypeError                                 Traceback (most recent call last)
~/ChangLab/projects/ecogVIS/ecogvis/functions/subDialogs.py in run(self)
    433                         mode=self.mode,
    434                         config=self.config,
--> 435                         new_file=self.new_fname)
    436 
    437 

~/ChangLab/projects/ecogVIS/ecogvis/signal_processing/processing_data.py in processing_data(path, subject, blocks, mode, config, new_file)
     26 
     27         if mode=='preprocess':
---> 28             preprocess_raw_data(block_path, config=config)
     29         elif mode=='decomposition':
     30             spectral_decomposition(block_path, bands_vals=config)

~/ChangLab/projects/ecogVIS/ecogvis/signal_processing/processing_data.py in preprocess_raw_data(block_path, config)
    294 
    295             # Write LFP to NWB file
--> 296             io.write(nwb)
    297             print('LFP saved in '+block_path)
    298 

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/utils.py in func_call(*args, **kwargs)
    412                         raise_from(ExceptionType(msg), None)
    413 
--> 414                 return func(self, **parsed['args'])
    415         else:
    416             def func_call(*args, **kwargs):

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/backends/hdf5/h5tools.py in write(self, **kwargs)
    217 
    218         cache_spec = popargs('cache_spec', kwargs)
--> 219         call_docval_func(super(HDF5IO, self).write, kwargs)
    220         if cache_spec:
    221             ref = self.__file.attrs.get(SPEC_LOC_ATTR)

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/utils.py in call_docval_func(func, kwargs)
    305 def call_docval_func(func, kwargs):
    306     fargs, fkwargs = fmt_docval_args(func, kwargs)
--> 307     return func(*fargs, **fkwargs)
    308 
    309 

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/utils.py in func_call(*args, **kwargs)
    412                         raise_from(ExceptionType(msg), None)
    413 
--> 414                 return func(self, **parsed['args'])
    415         else:
    416             def func_call(*args, **kwargs):

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/backends/io.py in write(self, **kwargs)
     39     def write(self, **kwargs):
     40         container = popargs('container', kwargs)
---> 41         f_builder = self.__manager.build(container, source=self.__source)
     42         self.write_builder(f_builder, **kwargs)
     43 

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/utils.py in func_call(*args, **kwargs)
    412                         raise_from(ExceptionType(msg), None)
    413 
--> 414                 return func(self, **parsed['args'])
    415         else:
    416             def func_call(*args, **kwargs):

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/build/map.py in build(self, **kwargs)
    168                 # TODO: if Datasets attributes are allowed to be modified, we need to
    169                 # figure out how to handle that starting here.
--> 170                 result = self.__type_map.build(container, self, builder=result, source=source, spec_ext=spec_ext)
    171         return result
    172 

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/utils.py in func_call(*args, **kwargs)
    412                         raise_from(ExceptionType(msg), None)
    413 
--> 414                 return func(self, **parsed['args'])
    415         else:
    416             def func_call(*args, **kwargs):

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/build/map.py in build(self, **kwargs)
   1658         builder.set_attribute('namespace', namespace)
   1659         builder.set_attribute(attr_map.spec.type_key(), data_type)
-> 1660         builder.set_attribute(attr_map.spec.id_key(), container.object_id)
   1661         return builder
   1662 

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/hdmf/utils.py in func_call(*args, **kwargs)
    410                     if parse_err:
    411                         msg = ', '.join(parse_err)
--> 412                         raise_from(ExceptionType(msg), None)
    413 
    414                 return func(self, **parsed['args'])

/anaconda3/envs/ecog_vis/lib/python3.7/site-packages/six.py in raise_from(value, from_value)

TypeError: incorrect type for 'value' (got 'NoneType', expected 'NoneType')
@luiztauffer
Copy link
Member

This is a problem on hdmf that just got solved these days. It hasn't been merged yet, so for now you should use the specific PR, just install it like this:

pip install git+https://github.com/hdmf-dev/hdmf.git@refs/pull/115/head 

@jessierliu
Copy link
Contributor Author

Gotcha, thanks! It's working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants