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

EDF blocks access when io is opened. #1557

Open
h-mayorquin opened this issue Sep 18, 2024 · 8 comments · Fixed by #1584
Open

EDF blocks access when io is opened. #1557

h-mayorquin opened this issue Sep 18, 2024 · 8 comments · Fixed by #1584
Milestone

Comments

@h-mayorquin
Copy link
Contributor

This is coming from here in Spikeinterface:

SpikeInterface/spikeinterface#1228

Here, basically this format can't only be opened once per file-system.

from pathlib import Path

from spikeinterface.extractors import EDFRecordingExtractor
from spikeinterface.core.base import _load_extractor_from_dict

file_path = Path("/home/heberto/neuroconv_testing_data/ephy_testing_data/edf/edf+C.edf")

recorder = EDFRecordingExtractor(file_path=file_path)
recorder_dict = recorder.to_dict()
recorder_from_dict = _load_extractor_from_dict(recorder_dict)


  File "/home/heberto/miniconda3/envs/spikeinterface_env/lib/python3.10/site-packages/neo/rawio/edfrawio.py", line 70, in _parse_header
    self.edf_reader = EdfReader(self.filename)
  File "pyedflib/_extensions/_pyedflib.pyx", line 146, in pyedflib._extensions._pyedflib.CyEdfReader.__init__
  File "pyedflib/_extensions/_pyedflib.pyx", line 209, in pyedflib._extensions._pyedflib.CyEdfReader.open
  File "pyedflib/_extensions/_pyedflib.pyx", line 181, in pyedflib._extensions._pyedflib.CyEdfReader.check_open_ok
OSError: /home/heberto/neuroconv_testing_data/ephy_testing_data/edf/edf+C.edf: file has already been opened
@zm711
Copy link
Contributor

zm711 commented Sep 18, 2024

Wasn't this a long term issue. I have no clue how to fix. Since you have some data from somewhere are you okay trying to make a fix?

@h-mayorquin
Copy link
Contributor Author

h-mayorquin commented Sep 18, 2024

Yeah, unfortunately, the fix would be to redo the IO entirely as we use a library for this one and is blocking. I don't think it would be too hard but I would be more weary about testing it.

@h-mayorquin
Copy link
Contributor Author

Mmm now that I think about it, we could use MNE. That should be easier.

@zm711
Copy link
Contributor

zm711 commented Sep 18, 2024

Yeah if it's possible. That'd be cool.

@h-mayorquin
Copy link
Contributor Author

@zm711 can you re-open this? I don't think this is fully solved fully yet and the IO is just restricted to get_analogsignal... but it is still blocked.

The solution will be to either use mne or roll this into our own memmaps.

@zm711
Copy link
Contributor

zm711 commented Oct 21, 2024

I think it autoclosed when I merged. happy to reopen.

@zm711 zm711 reopened this Oct 21, 2024
@zm711
Copy link
Contributor

zm711 commented Oct 21, 2024

Should I also modify the milestone to future in this case?

@h-mayorquin
Copy link
Contributor Author

Yes, please do.

@zm711 zm711 modified the milestones: 0.13.4, future Oct 21, 2024
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

Successfully merging a pull request may close this issue.

2 participants