Git Product home page Git Product logo

Comments (14)

luiztauffer avatar luiztauffer commented on June 19, 2024

hi @cbin-cnl , did the problem of opening a file get solved on your end?
Do you get any specific error when trying to save a new file? If yes, can you copy the error track (printed in the terminal)?

from ecogvis.

cbin-cnl avatar cbin-cnl commented on June 19, 2024

Hi Luiz,

Yes I can open the file and add channels, but the gui crashes once I try to save. The error message is below:
Traceback (most recent call last): File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/ecogvis-1.0.1-py3.6.egg/ecogvis/ecogvis.py", line 530, in save_badchannel self.model.BadChannelSave() File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/ecogvis-1.0.1-py3.6.egg/ecogvis/functions/subFunctions.py", line 748, in BadChannelSave self.nwb.electrodes['bad'].data[indices] = aux File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/hdmf/common/table.py", line 504, in __getitem__ raise KeyError(key) KeyError: 'bad'

from ecogvis.

luiztauffer avatar luiztauffer commented on June 19, 2024

thanks for the report! I'll check it

from ecogvis.

luiztauffer avatar luiztauffer commented on June 19, 2024

@cbin-cnl it seems like you're not using the most updated code, could you please try installing the current repo version of EcogVIS in your working environment?

$ pip uninstall ecogvis
$ git clone https://github.com/catalystneuro/ecogVIS.git
$ cd ecogVIS
$ pip install .

I couldn't reproduce the error locally, this is probably because of some changes in ecogvis that were not published to pypi yet. If it's not urgent, you can also wait a couple of days max and I'll be releasing a new version, so you can upgrade through pip.

from ecogvis.

cbin-cnl avatar cbin-cnl commented on June 19, 2024

Hi Luiz, thanks for the quick response.

Unfortunately updating the code did not work, I still get the following error:

File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/ecogvis/ecogvis.py", line 530, in save_badchannel  
self.model.BadChannelSave()   
File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/ecogvis/functions/subFunctions.py", line 744, in BadChannelSave
self.nwb.electrodes['bad'].data[:] = aux
File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/hdmf/common/table.py", line 504, in __getitem__
    raise KeyError(key)
KeyError: 'bad'

To clarify, I can open the file fine, but cannot save the channels unless the NWB file already has a "bad" electrodes column.

Thanks again

from ecogvis.

luiztauffer avatar luiztauffer commented on June 19, 2024

of course, I can see it now
I'll put a fix for this in the current PR and let you know once it's merged!

from ecogvis.

cbin-cnl avatar cbin-cnl commented on June 19, 2024

Great thanks so much!

from ecogvis.

luiztauffer avatar luiztauffer commented on June 19, 2024

@cbin-cnl it took a bit, sorry, the merge is in place.
could you please confirm this solved the problem on your end?

from ecogvis.

cbin-cnl avatar cbin-cnl commented on June 19, 2024

Hi Luiz,

Unfortunately it still looks like there is a problem with adding a column to an existing Electrode table. I'm getting the following error:

    self.model.BadChannelSave()
  File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/ecogvis-1.1.0-py3.6.egg/ecogvis/functions/subFunctions.py", line 765, in BadChannelSave
    data=aux,
  File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/hdmf/utils.py", line 483, in func_call
    return func(args[0], **parsed['args'])
  File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/pynwb/file.py", line 494, in add_electrode_column
    call_docval_func(self.electrodes.add_column, kwargs)
  File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/hdmf/utils.py", line 364, in call_docval_func
    return func(*fargs, **fkwargs)
  File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/hdmf/utils.py", line 483, in func_call
    return func(args[0], **parsed['args'])
  File "/home/cbin-user/tdt2nwb/ecogvis/lib/python3.6/site-packages/hdmf/common/table.py", line 462, in add_column
    raise ValueError("column must have the same number of rows as 'id'")
ValueError: column must have the same number of rows as 'id'
Aborted (core dumped)

However, I think I can just ensure I have a "bad" channels column in my electrode table. Thank you.

from ecogvis.

luiztauffer avatar luiztauffer commented on June 19, 2024

I'll get this fix, thanks for reporting it

from ecogvis.

luiztauffer avatar luiztauffer commented on June 19, 2024

@cbin-cnl I managed to reproduce your error now
is it the case that your electricalseries is mapped to a subset of electrodes smaller than the total number of electrodes? Just to make sure we found the same problem
I'll fix it

from ecogvis.

cbin-cnl avatar cbin-cnl commented on June 19, 2024

Thanks Luiz, sorry just looking at this now. Thanks for making the change. Just wanted to check, the "save bad channels" button has been removed? Is the intention to just save a new NWB file with the bad channel annotation?

from ecogvis.

luiztauffer avatar luiztauffer commented on June 19, 2024

@cbin-cnl that's correct. Do you have the specific need of saving it in the same file?

from ecogvis.

cbin-cnl avatar cbin-cnl commented on June 19, 2024

Hi Luiz, no, that should be fine, just wanted to make sure that was the intention.

from ecogvis.

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.