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: @recordEngine #37

Open
phanhuynh opened this issue Jul 29, 2022 · 1 comment
Open

Error: @recordEngine #37

phanhuynh opened this issue Jul 29, 2022 · 1 comment

Comments

@phanhuynh
Copy link

Hello folks :) Thank you in advance!
I'm getting this cryptic error:
Loading Open-Ephys: reading settings...

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Input In [6], in <cell line: 2>()
      1 import pyopenephys
----> 2 file = pyopenephys.File("Z:/EPSZTEIN/Mathilde/Septum Inactivation/Data/Data_raw/MA02/MA02_2021-03-19_15-13-20")

File ~\Anaconda3\envs\oeenv\lib\site-packages\pyopenephys\core.py:145, in File.__init__(self, foldername)
    143     self._experiments = []
    144     for id in exp_ids:
--> 145         self._experiments.append(Experiment(self._absolute_foldername, id, self))
    147 elif np.any([f.startswith('experiment') for f in files]):
    148     self.format = 'binary'

File ~\Anaconda3\envs\oeenv\lib\site-packages\pyopenephys\core.py:184, in Experiment.__init__(self, path, id, file)
    182 if self.file.format == 'openephys':
    183     self._path = self._absolute_foldername
--> 184     self._read_settings(id)
    186     # retrieve number of recordings
    187     if self.acquisition_system is not None:

File ~\Anaconda3\envs\oeenv\lib\site-packages\pyopenephys\core.py:304, in Experiment._read_settings(self, id)
    301                     self._channel_info['gain'][chnum] = 1
    303 # Check openephys format
--> 304 if self.settings['CONTROLPANEL']['@recordEngine'] == 'OPENEPHYS':
    305     self.format = 'openephys'
    306 elif self.settings['CONTROLPANEL']['@recordEngine'] == 'RAWBINARY':

KeyError: '@recordEngine'
@Aleman-Z
Copy link

Aleman-Z commented Aug 21, 2023

It probably can't find the '@recordEngine' key because your data may be older than the versions supported by pyopenephys and that key was not included in the settings at the time. Try deleting the [@recordEngine] brakets or just directly indicate the openephys format you are using, e.g. self.format='openephys'

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