Skip to content

Error while using '--with-prov' flag #108

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

Closed
gregblt opened this issue Oct 27, 2017 · 2 comments
Closed

Error while using '--with-prov' flag #108

gregblt opened this issue Oct 27, 2017 · 2 comments
Labels
Milestone

Comments

@gregblt
Copy link

gregblt commented Oct 27, 2017

Hi,

When I'm trying to use heudiconv with the '-p' flag, I get the following error (it works properly without using this flag):

INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'session': 'baseline', 'outdir': '/SPINE_BIDS_Test_server-side/nifti/', 'subject': '004'}
INFO: Processing 480 dicoms
INFO: Analyzing 480 dicoms
INFO: Generated sequence info with 3 entries
INFO: Doing conversion using dcm2niix
INFO: Converting /SPINE_BIDS_Test_server-side/nifti/sub-004/ses-baseline/anat/sub-004_ses-baseline_FLAIR (128 DICOMs) -> /SPINE_BIDS_Test_server-side/nifti/sub-004/ses-baseline/anat . Converter: dcm2niix . Output types: ('nii.gz',)
INFO: Executing node convert in dir: /tmp/heudiconvdcm23WAK6/convert
INFO: Running: dcm2niix -b y -z i -x n -t n -m n -f anat -o /tmp/heudiconvdcm23WAK6/convert -s n -v n /tmp/heudiconvdcm23WAK6/convert/1.3.12.2.1107.5.2.7.20107.4.0.1576580820461847.dcm
Traceback (most recent call last):
File "/usr/local/bin/heudiconv", line 2197, in
main()
File "/usr/local/bin/heudiconv", line 2189, in main
return _main(args)
File "/usr/local/bin/heudiconv", line 2052, in _main
min_meta=args.minmeta)
File "/usr/local/bin/heudiconv", line 1407, in convert_dicoms
min_meta=min_meta)
File "/usr/local/bin/heudiconv", line 911, in convert
res = convertnode.run()
File "/opt/conda/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 372, in run
self._run_interface()
File "/opt/conda/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 482, in _run_interface
self._result = self._run_command(execute)
File "/opt/conda/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 613, in _run_command
result = self._interface.run()
File "/opt/conda/lib/python2.7/site-packages/nipype/interfaces/base.py", line 1130, in run
prov_record = write_provenance(results)
File "/opt/conda/lib/python2.7/site-packages/nipype/utils/provenance.py", line 289, in write_provenance
ps.add_results(results)
File "/opt/conda/lib/python2.7/site-packages/nipype/utils/provenance.py", line 416, in add_results
for key, value in list(get_info().items()):
File "/opt/conda/lib/python2.7/site-packages/nipype/init.py", line 47, in get_info
return _get_pkg_info(os.path.dirname(file))
File "/opt/conda/lib/python2.7/site-packages/nipype/pkg_info.py", line 88, in get_pkg_info
src, hsh = pkg_commit_hash(pkg_path)
File "/opt/conda/lib/python2.7/site-packages/nipype/pkg_info.py", line 56, in pkg_commit_hash
archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
File "/opt/conda/lib/python2.7/site-packages/backports/configparser/init.py", line 811, in get
d)
File "/opt/conda/lib/python2.7/site-packages/backports/configparser/init.py", line 384, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "/opt/conda/lib/python2.7/site-packages/backports/configparser/init.py", line 434, in _interpolate_some
"found: %r" % (rest,))
backports.configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: u'%h'

My script :

#!/bin/bash

 wrk_dir='/home/gregory/Documents/SPINE_BIDS_Test_server-side/'
 nifti_dir='/nifti/'
 nifti_pat='/SPINE_BIDS_Test_server-side/'$nifti_dir
 dicom_dir='/SPINE_BIDS_Test_server-side/DICOM-lite/DICOM_sub-{subject}/ses-{session}/*/*.dcm'
 heuristic_file='/SPINE_BIDS_Test_server-side/heuristic.py'

 cd $wrk_dir

 sudo docker run --rm -it -v $PWD:/SPINE_BIDS_Test_server-side nipy/heudiconv \
 	-d ${dicom_dir} \
 	-s "004" \
 	-ss "baseline" \
 	-f ${heuristic_file} \
 	-b \
 	-p \
 	--minmeta \
 	-c dcm2niix \
 	-o ${nifti_pat}
@satra
Copy link
Member

satra commented Oct 27, 2017

@gregorymichelet - we will be addressing this with the latest nipype release in a couple of weeks. just bear with us till then.

@mgxd mgxd added the bug label Oct 27, 2017
@mgxd mgxd added this to the future milestone Nov 6, 2017
@mgxd
Copy link
Member

mgxd commented Mar 13, 2019

This should be fixed since nipy/nipype#2701

@mgxd mgxd closed this as completed Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants