Skip to content

Current pipeline.py logic launches error if ephys_mode not no_curation #161

@CBroz1

Description

@CBroz1

Someone looking to test out the workflow with acute would hit the following error

----> 1 from workflow_array_ephys.pipeline import ephys

File ~/workflow-array-ephys/workflow_array_ephys/pipeline.py:20, in <module>
     15 from .paths import (get_ephys_root_data_dir,
     16                     get_session_directory,
     17                     get_electrode_localization_dir)
     19 # session and ephys nwb exports check for these in linking_module
---> 20 from .export import element_lab_to_nwb_dict, subject_to_nwb, session_to_nwb
     22 if 'custom' not in dj.config:
     23     dj.config['custom'] = {}

File ~/workflow-array-ephys/workflow_array_ephys/export.py:7, in <module>
      4 from element_session.export.nwb import session_to_nwb
      6 # Import ephys NWB export functions
----> 7 from element_array_ephys.export.nwb import ecephys_session_to_nwb, write_nwb
      9 __all__ = ['element_lab_to_nwb_dict', 'subject_to_nwb', 'session_to_nwb',
     10            'ecephys_session_to_nwb', 'write_nwb']

File ~/element-array-ephys/element_array_ephys/export/nwb/__init__.py:1, in <module>
----> 1 from .nwb import ecephys_session_to_nwb, write_nwb

File ~/element-array-ephys/element_array_ephys/export/nwb/nwb.py:23, in <module>
     21 ephys_mode = os.getenv('EPHYS_MODE', dj.config['custom'].get('ephys_mode', 'acute'))
     22 if ephys_mode != 'no-curation':
---> 23     raise NotImplementedError('This export function is designed for the no_curation '
     24                               +'schema')
     27 class DecimalEncoder(json.JSONEncoder):
     28     def default(self, o):

NotImplementedError: This export function is designed for the no_curation schema

I suggest moving Line 20 down to the ephys_mode conditional block

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions