Dcm2Bids icon indicating copy to clipboard operation
Dcm2Bids copied to clipboard

Subprocess Error Assistance

Open faulknerryan72 opened this issue 11 months ago • 2 comments

While trying to convert the data using dcm2bids I got the following error:

Error: Converted 10266 of 11032 files
Traceback (most recent call last):
  File "/apps/python/3.10/bin/dcm2bids", line 8, in <module>
    sys.exit(main())
  File "/apps/python/3.10/lib/python3.10/site-packages/dcm2bids/dcm2bids.py", line 248, in main
    return app.run()
  File "/apps/python/3.10/lib/python3.10/site-packages/dcm2bids/dcm2bids.py", line 110, in run
    dcm2niix.run(self.forceDcm2niix)
  File "/apps/python/3.10/lib/python3.10/site-packages/dcm2bids/dcm2niix.py", line 77, in run
    self.execute()
  File "/apps/python/3.10/lib/python3.10/site-packages/dcm2bids/dcm2niix.py", line 100, in execute
    output = run_shell_command(cmd)
  File "/apps/python/3.10/lib/python3.10/site-packages/dcm2bids/utils.py", line 120, in run_shell_command
    return check_output(commandLine)
  File "/apps/python/3.10/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/apps/python/3.10/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dcm2niix', '-b', 'y', '-ba', 'y', '-z', 'y', '-f', '%3s_%f_%p_%t', '-o', PosixPath('/orange/ebner/share/studies_in_progress/DecidingBrain1/DB1_MRI/tmp_dcm2bids/<id>'), PosixPath('/orange/ebner/share/studies_in_progress/DecidingBrain1/DB1_MRI/sourcedata/scan_data/DB1_MRI_<id>')]' returned non-zero exit status 8.

I have blocked out the ID (though deidentified) as additional privacy precaution. Using the exact same script I have converted the other 90+ sessions with no trouble. I am confused because I have checked the DICOMs and experimenter notes both of which don't state anything for concern on the acquisition why this error is arising on the acquisition side of things. Any further help/explanation with this would be greatly appreciated!

faulknerryan72 avatar Mar 20 '24 19:03 faulknerryan72

Maybe you could try to convert your data with dcm2niix hoping that there are more verbose messages.

crossmanith avatar Apr 24 '24 09:04 crossmanith

Hello @faulknerryan72 , Did you test what @crossmanith suggest you ? Did it help you fix this issue ?

arnaudbore avatar Apr 30 '24 14:04 arnaudbore

@faulknerryan72 I'm closing this issue, feel free to ask questions on neurostars.org using the tag dcm2bids. We've got a great community that can help you if needed.

arnaudbore avatar May 31 '24 16:05 arnaudbore