Skip to content

OSError: No available data format detected. #7

Open

Description

@Aryo-Zare

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.

Activity

  1. Aryo-Zare commented on Nov 18, 2021

    @Aryo-Zare
    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 !!

  2. jsiegle commented on Nov 18, 2021

    @jsiegle
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions