Coder Social home page Coder Social logo

Comments (4)

TomDLT avatar TomDLT commented on May 27, 2024

Could you send the full traceback ?

from pactools.

lepmik avatar lepmik commented on May 27, 2024

Sorry, here it comes

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-71-b6c0e5191975> in <module>
     40         continue
     41     spec, xlim, sigdriv, sigdriv_imag = dar._amplitude_frequency()
---> 42     estimator.save(raw_path / (name + '.hdf5'))
     43     action_group = output_group.require_group(name)
     44     action_group.attrs = {

~/.virtualenvs/expipe/lib/python3.6/site-packages/pactools/comodulogram.py in save(self, fname, overwrite)
    589                 save_vars['progress_bar'] = True
    590         write_hdf5(fname, save_vars, title='comodulogram', overwrite=overwrite,
--> 591                    slash='replace')
    592 
    593 

~/.virtualenvs/expipe/lib/python3.6/site-packages/mne/externals/h5io/_h5io.py in write_hdf5(fname, data, overwrite, compression, title, slash)
    105         cleanup_data = []
    106         _triage_write(title, data, fid, comp_kw, str(type(data)),
--> 107                       cleanup_data=cleanup_data, slash=slash, title=title)
    108 
    109     # Will not be empty if any extra data to be written

~/.virtualenvs/expipe/lib/python3.6/site-packages/mne/externals/h5io/_h5io.py in _triage_write(key, value, root, comp_kw, where, cleanup_data, slash, title)
    136             _triage_write(
    137                 'key_{0}'.format(key), sub_value, sub_root, comp_kw,
--> 138                 where + '["%s"]' % key, cleanup_data=cleanup_data, slash=slash)
    139     elif isinstance(value, (list, tuple)):
    140         title = 'list' if isinstance(value, list) else 'tuple'

~/.virtualenvs/expipe/lib/python3.6/site-packages/mne/externals/h5io/_h5io.py in _triage_write(key, value, root, comp_kw, where, cleanup_data, slash, title)
    206 
    207         err_str = 'unsupported type %s (in %s)' % (type(value), where)
--> 208         raise TypeError(err_str)
    209 
    210 ##############################################################################

TypeError: unsupported type <class 'pactools.dar_model.dar.DAR'> (in <class 'dict'>["method"])

from pactools.

TomDLT avatar TomDLT commented on May 27, 2024

Oh I see, this is when you are saving the comodulogram.
We cannot currently save a DAR object with h5io, not sure what is the best workaround.
Maybe we should just not save the DAR object in this case, what do you think?

from pactools.

lepmik avatar lepmik commented on May 27, 2024

Saving the DAR object would be a good idea, or extract all parameters that is necessary in order to replicate the analysis.

from pactools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.