error in datagrabber

32 views
Skip to first unread message

rickys

unread,
Feb 21, 2013, 2:03:06 AM2/21/13
to nipy...@googlegroups.com
I am trying to run the below datagrabber:

#grab copes, varcopes, and transforms
datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
                                               outfields=['transforms', 'cope1s', 'cope2s', 'varcope1s', 'varcope2s']),
                     name = 'datasource')
datasource.inputs.base_directory = '/mnt/nfs/proj/delab/Ricky/RoE/workingdir'
datasource.inputs.template = '*'
datasource.inputs.field_template = dict(transforms='registration/_subject_id_%s/%s',                                                   # transforms
                                        cope1s='modelfit/_subject_id_%s/conestimate/mapflow/_conestimate0/cope1.nii.gz',               # cope1s
                                        cope2s='modelfit/_subject_id_%s/conestimate/mapflow/_conestimate0/cope2.nii.gz',               # cope2s
                                        varcope1s='modelfit/_subject_id_%s/conestimate/mapflow/_conestimate0/varcope1.nii.gz',         # varcope1s
                                        varcope2s='modelfit/_subject_id_%s/conestimate/mapflow/_conestimate0/varcope2.nii.gz')         #varcope2s   

datasource.inputs.template_args = dict(transforms=[['subject_id', ['standard_register/transform1Warp.nii.gz', 'standard_register/transform0Affine.mat', 
   'structural_register/transform1Warp.nii.gz', 'structural_register/transform0Affine.mat']]],
                                       copes1=[['subject_id']],
                                       copes2=[['subject_id']],
                                       varcopes1=[['subject_id']],
                                       varcopes2=[['subject_id']])                     

But I am getting the below error:

raise TypeError(e.message + ": Template %s failed to convert with args %s"%(template, str(tuple(argtuple))))
TypeError: not all arguments converted during string formatting: Template /mydir/* failed to convert with args ('1000-D-1',)
Interface DataGrabber failed to run.

I am simply passing in the list of subjects in subject_id. Any ideas what I might be messing up? Similar code I have run perfectly fine with other data sets, and I don't see any differences here...

Thanks,

-Ricky

Satrajit Ghosh

unread,
Feb 21, 2013, 10:55:03 PM2/21/13
to nipy-user
hi ricky,

this seems strange as there is no template '/mydir/*' that i can see in this datagrabber. are you positive this is the datagrabber that crashes?

cheers,

satra



--
 
---
You received this message because you are subscribed to the Google Groups "NiPy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nipy-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

rickys

unread,
Feb 25, 2013, 11:55:22 AM2/25/13
to nipy...@googlegroups.com
Hi Satra,

Thanks for the response. This was the datagrabber that crashed, but I fixed it simply by removing the field_template and just using a more general template like this:

datasource.inputs.template = '%s/_subject_id_%s/%s'

and then i used the appropriate template args dict. I am not sure why this error came up, but the field_template worked on all my other pipelines. Strange.

Thanks for the help! -Ricky
Reply all
Reply to author
Forward
0 new messages