FitLins: Error on loader

Dear Neurostars crowd,

we are currently implementing a new fMRI pipeline in the lab and are testing FitLins as a follow up to MRIQC and fMRIPrep. I am running FitLins through Docker on a fMRIPrep-processed dataset (simple output, no cifti). BIDS validation passes for both the raw data and the derivatives files. FitLins is ver 0.7.0 (BIDS 1.1.0), fMRIPrep is ver 20.1.1 (BIDS 1.1.1). I carefully matched the model file to the online examples and at minimum, it passes json.load() when testing for obvious errors.

Before any real processing happens, I get the following errors:


201012-10:05:39,305 nipype.utils WARNING:
A newer version (1.5.1) of nipy/nipype is available. You are using 1.5.0
201012-10:05:45,210 nipype.workflow WARNING:
Storing result file without outputs
201012-10:05:45,211 nipype.workflow WARNING:
[Node] Error on “fitlins_wf.loader” (/working_dir/fitlins_wf/loader)
201012-10:05:45,521 nipype.workflow ERROR:
Node loader failed to run on host df292346edbc.
201012-10:05:45,524 nipype.workflow ERROR:
Saving crash info to /working_dir/crash-20201012-100545-UID1541801116-loader-20a1a3c4-0f46-4096-a162-6bfae5e11684.txt
Traceback (most recent call last):
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/”, line 148, in init
TypeError: init() got an unexpected keyword argument ‘initializer’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/”, line 67, in run_node
result[“result”] =
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/”, line 516, in run
result = self._run_interface(execute=True)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/”, line 635, in _run_interface
return self._run_command(execute)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/”, line 741, in _run_command
result =
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/interfaces/base/”, line 397, in run
runtime = self._run_interface(runtime)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/fitlins/interfaces/”, line 221, in _run_interface
self._load_level1(runtime, analysis)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/fitlins/interfaces/”, line 304, in _load_level1
names.extend(col for col in dense.columns if col.startswith(‘non_steady_state’))
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/fitlins/interfaces/”, line 304, in
names.extend(col for col in dense.columns if col.startswith(‘non_steady_state’))
AttributeError: ‘tuple’ object has no attribute ‘startswith’

201012-10:05:47,518 nipype.workflow ERROR:
could not run node: fitlins_wf.loader
Traceback (most recent call last):
File “/opt/miniconda-latest/envs/neuro/bin/fitlins”, line 8, in
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/fitlins/cli/”, line 271, in main
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/fitlins/cli/”, line 265, in run_fitlins
write_full_report(report_dict, run_context, deriv_dir)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/fitlins/viz/”, line 132, in write_full_report
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/”, line 1215, in write_text
with‘w’, encoding=encoding, errors=errors) as f:
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/”, line 1183, in open
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/”, line 1037, in _opener
return, flags, mode)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/”, line 387, in wrapped
return strfunc(str(pathobj), *args)
FileNotFoundError: [Errno 2] No such file or directory: ‘/output/fitlins/reports/model-3cond.html’


Following some (layman-level) digging, it seems to me the AttributeError during execution of is linked to reading input json files (can’t make out which) where at some point during transformation to dataframes and reading of columns, a tuple is extracted instead of a single value. All help is very much appreciated!



This seems like a bug. Can you please open an issue on It will be easier to track there.

Thanks for the quick reaction and the amazing work!