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

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

Open
CBroz1 opened this issue Jul 20, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@CBroz1
Copy link
Contributor

CBroz1 commented Jul 20, 2022

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

@CBroz1 CBroz1 added the bug Something isn't working label Jul 20, 2022
@kabilar kabilar transferred this issue from datajoint/workflow-array-ephys Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant