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

Make getting LFP data robust #124

Closed
bjhardcastle opened this issue Sep 20, 2024 · 7 comments
Closed

Make getting LFP data robust #124

bjhardcastle opened this issue Sep 20, 2024 · 7 comments
Assignees

Comments

@bjhardcastle
Copy link
Member

A couple of bugs still remain in 0.0.242:

674562_2023-10-05

Traceback (most recent call last):
  File "/code/run.py", line 51, in <module>
    npc_sessions_cache.write_all_components_to_cache(session=session, skip_existing=args.skip_existing)
  File "/code/npc_sessions_cache/src/npc_sessions_cache/utils/cache.py", line 251, in write_all_components_to_cache
    component = _get_nwb_component(session, component_name)
  File "/code/npc_sessions_cache/src/npc_sessions_cache/utils/cache.py", line 89, in _get_nwb_component
    in session.processing["behavior"].fields["data_interfaces"].keys()
  File "/opt/conda/lib/python3.9/site-packages/npc_sessions/sessions.py", line 728, in processing
    module = getattr(self, f"_{module_name}")
  File "/opt/conda/lib/python3.9/site-packages/npc_io/cached_property.py", line 79, in __get__
    val = self.func(instance)
  File "/opt/conda/lib/python3.9/site-packages/npc_sessions/sessions.py", line 764, in _ecephys
    if self.is_ephys and self._subsampled_LFP is not None:
  File "/opt/conda/lib/python3.9/site-packages/npc_io/cached_property.py", line 79, in __get__
    val = self.func(instance)
  File "/opt/conda/lib/python3.9/site-packages/npc_sessions/sessions.py", line 1698, in _subsampled_LFP
    subsampled_LFP_results = npc_ephys.get_LFP_subsampled_results(
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/LFP.py", line 138, in get_LFP_subsampled_results
    probe_LFP_subsampled_result = _get_LFP_probe_result(
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/LFP.py", line 85, in _get_LFP_probe_result
    probe_LFP_zarr = zarr.open(probe_LFP_zarr_file, mode="r")
  File "/opt/conda/lib/python3.9/site-packages/zarr/convenience.py", line 132, in open
    raise PathNotFoundError(path)
zarr.errors.PathNotFoundError: nothing found at path ''

674562_2023-10-02

Traceback (most recent call last):
  File "/code/run.py", line 51, in <module>
    npc_sessions_cache.write_all_components_to_cache(session=session, skip_existing=args.skip_existing)
  File "/code/npc_sessions_cache/src/npc_sessions_cache/utils/cache.py", line 251, in write_all_components_to_cache
    component = _get_nwb_component(session, component_name)
  File "/code/npc_sessions_cache/src/npc_sessions_cache/utils/cache.py", line 89, in _get_nwb_component
    in session.processing["behavior"].fields["data_interfaces"].keys()
  File "/opt/conda/lib/python3.9/site-packages/npc_sessions/sessions.py", line 728, in processing
    module = getattr(self, f"_{module_name}")
  File "/opt/conda/lib/python3.9/site-packages/npc_io/cached_property.py", line 79, in __get__
    val = self.func(instance)
  File "/opt/conda/lib/python3.9/site-packages/npc_sessions/sessions.py", line 765, in _ecephys
    modules.extend(self._subsampled_LFP)
  File "/opt/conda/lib/python3.9/site-packages/hdmf/utils.py", line 667, in func_call
    pargs = _check_args(args, kwargs)
  File "/opt/conda/lib/python3.9/site-packages/hdmf/utils.py", line 660, in _check_args
    raise ExceptionType(msg)
TypeError: MultiContainerInterface.__make_getitem.<locals>._func: incorrect type for 'name' (got 'int', expected 'str')
@arjunsridhar12345
Copy link
Contributor

674562_2023-10-05 is a bad data asset that I archived

674562_2023-10-02 not sure what's going here. Stepping through it gives me the warning message and not an error. Possibly be not updated dependencies looking at the lock file in npc_sessions_cache? But I don't think that makes sense given that it's not seen for more so need to investigate further

@bjhardcastle
Copy link
Member Author

Ah ok, it's possible I copied the error message from an earlier run of the caching (it's one job per computation, and not easy to search through them for a particular failed session). I'll try re-running that session

@bjhardcastle
Copy link
Member Author

Confirmed it's ok

@bjhardcastle
Copy link
Member Author

@arjunsridhar12345 problem in npc_ephys.LFP if zarr file doesn't exist.. need to accommodate this

  File "/opt/conda/lib/python3.9/site-packages/npc_sessions/sessions.py", line 1698, in _subsampled_LFP
    subsampled_LFP_results = npc_ephys.get_LFP_subsampled_results(
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/LFP.py", line 138, in get_LFP_subsampled_results
    probe_LFP_subsampled_result = _get_LFP_probe_result(
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/LFP.py", line 85, in _get_LFP_probe_result
    probe_LFP_zarr = zarr.open(probe_LFP_zarr_file, mode="r")
  File "/opt/conda/lib/python3.9/site-packages/zarr/convenience.py", line 132, in open
    raise PathNotFoundError(path)
zarr.errors.PathNotFoundError: nothing found at path ''

@bjhardcastle bjhardcastle reopened this Sep 24, 2024
@arjunsridhar12345
Copy link
Contributor

@bjhardcastle is this the same session - 674562-2023-10-03? if not, would it happen to be 668759_2023-07-11?

@arjunsridhar12345
Copy link
Contributor

arjunsridhar12345 commented Sep 24, 2024

ok fairly sure, its another rogue data asset with that session 668759_2023-07-11. I've archived it. looked at the output for this session and saw this error.

@bjhardcastle
Copy link
Member Author

Sorry didn't realize that wasn't printed in the error message. Yeah it is 668759_2023-07-11

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