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

OSError: No available data format detected. #7

Open
Aryo-Zare opened this issue Nov 18, 2021 · 2 comments
Open

OSError: No available data format detected. #7

Aryo-Zare opened this issue Nov 18, 2021 · 2 comments

Comments

@Aryo-Zare
Copy link

Hi

Thanks for creating this tool.
I would like to use it for a preliminary analysis (evoked potentials or PSTH from MUA, hence no spike sorting).

I installed it in my anaconda python environment. Yet I have problem using it.
When I create a session I get an error message (below). I'm not sure if it's related to how I address to the recording directory.
The recorded data is in binary format.

from open_ephys.analysis import Session
directory = 'D:\rec\2021-10-22\3\2021-10-22_12-21-09'
session = Session(directory)

Traceback (most recent call last):

  File "<ipython-input-18-3442c9729491>", line 1, in <module>
    session = Session(directory5)

  File "C:\Users\azare\Anaconda3\lib\site-packages\open_ephys\analysis\session.py", line 59, in __init__
    self._detect_record_nodes()

  File "C:\Users\azare\Anaconda3\lib\site-packages\open_ephys\analysis\session.py", line 73, in _detect_record_nodes
    self.recordings = RecordNode(self.directory).recordings

  File "C:\Users\azare\Anaconda3\lib\site-packages\open_ephys\analysis\recordnode.py", line 57, in __init__
    self._detect_format()

  File "C:\Users\azare\Anaconda3\lib\site-packages\open_ephys\analysis\recordnode.py", line 77, in _detect_format
    raise(IOError('No available data format detected.'))

OSError: No available data format detected.
@Aryo-Zare
Copy link
Author

Hello Again

I copied the main directory ('2021-10-22_12-21-09') directly in python's current working directory.

from open_ephys.analysis import Session
directory = '2021-10-22_12-21-09'
session = Session(directory)

And the command was executed successfully. Hence this issue is resolved.
But I'm still curious to find out why the previous command is not functional !!

@jsiegle
Copy link
Member

jsiegle commented Nov 18, 2021

Try making the data directory an "r" string, like this:

r'D:\rec\2021-10-22\3\2021-10-22_12-21-09'

Otherwise it will treat the backslashes as escape characters, and won't recognize the directory.

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