AllenNeuralDynamics / aind-ephys-pipeline

Code Ocean pipeline for ephys processing with Kilosort2.5
MIT License
5 stars 2 forks source link

NWB writing is failing #19

Closed bjhardcastle closed 1 month ago

bjhardcastle commented 2 months ago

@alejoe91 I got this for all recent runs. We're sort of relying on this NWB now.

Is it possible to re-run only this step for jobs that failed?

Command exit status:
  1

Command output:
  [capsule-7106853] cloning git repo...
  [capsule-7106853] running capsule...
  NWB backend: zarr
  Found 6 JSON job files. Recording names:
  ['experiment1_Record Node 104#Neuropix-PXI-100.ProbeE-AP_recording1', 'experiment1_Record Node 104#Neuropix-PXI-100.ProbeF-AP_recording1', 'experiment1_Record Node 108#Neuropix-PXI-100.ProbeA-AP_recording1', 'experiment1_Record Node 104#Neuropix-PXI-100.ProbeD-AP_recording1', 'experiment1_Record Node 108#Neuropix-PXI-100.ProbeC-AP_recording1', 'experiment1_Record Node 108#Neuropix-PXI-100.ProbeB-AP_recording1']
  Number of NWB files to write: 1
  Number of streams to write for each file: 6

Command error:
  [capsule-7106853] cloning git repo...
  Cloning into 'capsule-repo'...
  [capsule-7106853] running capsule...
  + python -u run_capsule.py
  NWB backend: zarr
  Found 6 JSON job files. Recording names:
  ['experiment1_Record Node 104#Neuropix-PXI-100.ProbeE-AP_recording1', 'experiment1_Record Node 104#Neuropix-PXI-100.ProbeF-AP_recording1', 'experiment1_Record Node 108#Neuropix-PXI-100.ProbeA-AP_recording1', 'experiment1_Record Node 104#Neuropix-PXI-100.ProbeD-AP_recording1', 'experiment1_Record Node 108#Neuropix-PXI-100.ProbeC-AP_recording1', 'experiment1_Record Node 108#Neuropix-PXI-100.ProbeB-AP_recording1']
  Number of NWB files to write: 1
  Number of streams to write for each file: 6
  Traceback (most recent call last):
    File "/tmp/nxf.V9c8H5rgCy/capsule/code/run_capsule.py", line 180, in <module>
      shutil.copytree(nwbfile_input_path, nwbfile_output_path)
    File "/opt/conda/lib/python3.9/shutil.py", line 566, in copytree
      return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
    File "/opt/conda/lib/python3.9/shutil.py", line 467, in _copytree
      os.makedirs(dst, exist_ok=dirs_exist_ok)
    File "/opt/conda/lib/python3.9/os.py", line 225, in makedirs
      mkdir(name, mode)
  FileExistsError: [Errno 17] File exists: '../results/ecephys_733887_2024-08-15_13-13-15_experiment1_recording1.nwb'

Work dir:
  s3://codeocean-s3batchbucket-16itpvq060udk/1f8f159a-7670-47a9-baf1-078905fc9c2e/52/9d6b0ef683f3571fe9625c58bd7caa

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
alejoe91 commented 2 months ago

Thanks for the report! Will look into it and fix tomorrow. Thanks to caching everything else will not need to be re-run

alejoe91 commented 2 months ago

@bjhardcastle I found the issue and fixed it. Re-triggering the run!

alejoe91 commented 2 months ago

This commit seems to have fixed it!