nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
630 stars 292 forks source link

RuntimeError: Compression is required, but svgo or cwebp are not installed #969

Closed mainux closed 6 years ago

mainux commented 6 years ago

Dear all,

I'm getting this error in the rois_plot funtion, but cwebp is installed, see below:

[mtermenon@cajal02 ~]$ which cwebp /usr/bin/cwebp

I also post the content of the crash txt: Node: fmriprep_wf.single_subject_08HBP3439S2_wf.func_preproc_task_rest_run_01_wf.bold_confounds_wf.rois_plot Working directory: /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_confounds_wf/rois_plot

Node inputs: colors = ['r', 'b', 'magenta'] compress_report = True generate_report = True ignore_exception = False in_file = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_bold_trans_wf/merge/vol0000_xform-00000_merged.nii.gz in_mask = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_bold_trans_wf/bold_reference_wf/enhance_and_skullstrip_bold_wf/combine_masks/ref_image_corrected_brain_mask_maths.nii.gz in_rois = ['/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_confounds_wf/tcompcor/mask_000.nii.gz', '/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_confounds_wf/acc_tfm/highres001_N4Corrected0_masked_prob_0_tpmsum_roi_trans_boldmsk.nii.gz'] masked = False out_report = report.svg

Traceback (most recent call last): File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 68, in run_node result['result'] = node.run(updatehash=updatehash) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 487, in run result = self._run_interface(execute=True) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 571, in _run_interface return self._run_command(execute) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 650, in _run_command result = self._interface.run(cwd=outdir) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/core.py", line 510, in run runtime = self._run_interface(runtime) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/interfaces/masks.py", line 268, in _run_interface compress=self.inputs.compress_report File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 266, in plot_segs **plot_params) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 309, in _plot_anat_with_contours svg = extract_svg(display, compress=compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 181, in extract_svg image_svg = svg_compress(image_svg, compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 105, in svg_compress raise RuntimeError('Compression is required, but svgo or cwebp are not installed')

RuntimeError: Compression is required, but svgo or cwebp are not installed

Thanks for your help,

Maite

chrisgorgo commented 6 years ago

Is svgo installed? - you need both.

BTW using Docker or Singularity will let you avoid all of those dependency headaches.

Best, Chris

On Feb 12, 2018 5:46 AM, "mainux" notifications@github.com wrote:

Dear all,

I'm getting this error in the rois_plot funtion, but cwebp is installed, see below:

[mtermenon@cajal02 ~]$ which cwebp /usr/bin/cwebp

I also post the content of the crash txt: Node: fmriprep_wf.single_subject_08HBP3439S2_wf.funcpreproc task_rest_run_01_wf.bold_confounds_wf.rois_plot Working directory: /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_confounds_wf/rois_plot

Node inputs: colors = ['r', 'b', 'magenta'] compress_report = True generate_report = True ignore_exception = False in_file = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_bold_trans_wf/merge/vol0000_xform-00000_merged.nii.gz in_mask = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_bold_trans_wf/bold_reference_wf/ enhance_and_skullstrip_bold_wf/combine_masks/refimage corrected_brain_mask_maths.nii.gz inrois = ['/bcbl/home/public/HBP MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/singlesubject 08HBP3439S2_wf/func_preproc_task_rest_run_01wf/bold confounds_wf/tcompcor/mask000.nii.gz', '/bcbl/home/public/HBP MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/singlesubject 08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_confounds_wf/acc_tfm/ highres001_N4Corrected0_masked_prob_0_tpmsum_roi_trans_boldmsk.nii.gz'] masked = False out_report = report.svg

Traceback (most recent call last): File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 68, in run_node result['result'] = node.run(updatehash=updatehash) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/ nipype/pipeline/engine/nodes.py", line 487, in run result = self._run_interface(execute=True) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 571, in _run_interface return self._run_command(execute) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/ nipype/pipeline/engine/nodes.py", line 650, in _run_command result = self._interface.run(cwd=outdir) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/interfaces/base/core.py", line 510, in run runtime = self._run_interface(runtime) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/interfaces/masks.py", line 268, in _run_interface compress=self.inputs.compress_report File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 266, in plot_segs **plot_params) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/viz/utils.py", line 309, in _plot_anat_with_contours svg = extract_svg(display, compress=compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 181, in extract_svg image_svg = svg_compress(image_svg, compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 105, in svg_compress raise RuntimeError('Compression is required, but svgo or cwebp are not installed')

RuntimeError: Compression is required, but svgo or cwebp are not installed

Thanks for your help,

Maite

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/poldracklab/fmriprep/issues/969, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOkpyGmqD-1gjWRtsNLneR1-jxRAnhxks5tUECagaJpZM4SCMM3 .

mainux commented 6 years ago

Thanks for your answer, we will install svgo. It will be great if in the error you specified that you need both instead of svgo or cwebp.

IT people told me that there is no way to use docker, so I was wondering if there is any list with all the dependencies, this way we will solve a lot of time.

Thanks in advance,

Maite Termenon Postdoctoral Researcher at BCBL Neurobiology of language group www.bcbl.eu

Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer

From: "Chris Filo Gorgolewski" notifications@github.com To: "poldracklab/fmriprep" fmriprep@noreply.github.com Cc: "mainux" m.termenon@bcbl.eu, "Author" author@noreply.github.com Sent: Monday, February 12, 2018 4:32:49 PM Subject: Re: [poldracklab/fmriprep] RuntimeError: Compression is required, but svgo or cwebp are not installed (#969)

Is svgo installed? - you need both.

BTW using Docker or Singularity will let you avoid all of those dependency headaches.

Best, Chris

On Feb 12, 2018 5:46 AM, "mainux" notifications@github.com wrote:

Dear all,

I'm getting this error in the rois_plot funtion, but cwebp is installed, see below:

[mtermenon@cajal02 ~]$ which cwebp /usr/bin/cwebp

I also post the content of the crash txt: Node: fmriprep_wf.single_subject_08HBP3439S2_wf.funcpreproc task_rest_run_01_wf.bold_confounds_wf.rois_plot Working directory: /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_confounds_wf/rois_plot

Node inputs: colors = ['r', 'b', 'magenta'] compress_report = True generate_report = True ignore_exception = False in_file = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_bold_trans_wf/merge/vol0000_xform-00000_merged.nii.gz in_mask = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_bold_trans_wf/bold_reference_wf/ enhance_and_skullstrip_bold_wf/combine_masks/refimage corrected_brain_mask_maths.nii.gz inrois = ['/bcbl/home/public/HBP MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/singlesubject 08HBP3439S2_wf/func_preproc_task_rest_run_01wf/bold confounds_wf/tcompcor/mask000.nii.gz', '/bcbl/home/public/HBP MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/singlesubject 08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_confounds_wf/acc_tfm/ highres001_N4Corrected0_masked_prob_0_tpmsum_roi_trans_boldmsk.nii.gz'] masked = False out_report = report.svg

Traceback (most recent call last): File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 68, in run_node result['result'] = node.run(updatehash=updatehash) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/ nipype/pipeline/engine/nodes.py", line 487, in run result = self._run_interface(execute=True) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 571, in _run_interface return self._run_command(execute) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/ nipype/pipeline/engine/nodes.py", line 650, in _run_command result = self._interface.run(cwd=outdir) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/interfaces/base/core.py", line 510, in run runtime = self._run_interface(runtime) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/interfaces/masks.py", line 268, in _run_interface compress=self.inputs.compress_report File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 266, in plot_segs **plot_params) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/viz/utils.py", line 309, in _plot_anat_with_contours svg = extract_svg(display, compress=compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 181, in extract_svg image_svg = svg_compress(image_svg, compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 105, in svg_compress raise RuntimeError('Compression is required, but svgo or cwebp are not installed')

RuntimeError: Compression is required, but svgo or cwebp are not installed

Thanks for your help,

Maite

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/poldracklab/fmriprep/issues/969, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOkpyGmqD-1gjWRtsNLneR1-jxRAnhxks5tUECagaJpZM4SCMM3 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or mute the thread .

chrisgorgo commented 6 years ago

Have a look at Singularity - it's an HPC friendly alternative to Docker that is supported and liked by admins of some of the most powerful clusters in the world. http://singularity.lbl.gov/

It will really save you a lot of hassle and make your analyses more reproducible.

Best, Chris

On Feb 13, 2018 1:47 AM, "mainux" notifications@github.com wrote:

Thanks for your answer, we will install svgo. It will be great if in the error you specified that you need both instead of svgo or cwebp.

IT people told me that there is no way to use docker, so I was wondering if there is any list with all the dependencies, this way we will solve a lot of time.

Thanks in advance,

Maite Termenon Postdoctoral Researcher at BCBL Neurobiology of language group www.bcbl.eu

Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer

From: "Chris Filo Gorgolewski" notifications@github.com To: "poldracklab/fmriprep" fmriprep@noreply.github.com Cc: "mainux" m.termenon@bcbl.eu, "Author" author@noreply.github.com Sent: Monday, February 12, 2018 4:32:49 PM Subject: Re: [poldracklab/fmriprep] RuntimeError: Compression is required, but svgo or cwebp are not installed (#969)

Is svgo installed? - you need both.

BTW using Docker or Singularity will let you avoid all of those dependency headaches.

Best, Chris

On Feb 12, 2018 5:46 AM, "mainux" notifications@github.com wrote:

Dear all,

I'm getting this error in the rois_plot funtion, but cwebp is installed, see below:

[mtermenon@cajal02 ~]$ which cwebp /usr/bin/cwebp

I also post the content of the crash txt: Node: fmriprep_wf.single_subject_08HBP3439S2_wf.funcpreproc task_rest_run_01_wf.bold_confounds_wf.rois_plot Working directory: /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_confounds_wf/rois_plot

Node inputs: colors = ['r', 'b', 'magenta'] compress_report = True generate_report = True ignore_exception = False in_file = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_bold_trans_wf/merge/vol0000_xform-00000_merged.nii.gz

in_mask = /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work_fmap/ fmriprep_wf/single_subject_08HBP3439S2_wf/funcpreproc task_rest_run_01_wf/bold_bold_trans_wf/bold_reference_wf/ enhance_and_skullstrip_bold_wf/combine_masks/refimage corrected_brain_mask_maths.nii.gz inrois = ['/bcbl/home/public/HBP MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/singlesubject 08HBP3439S2_wf/func_preproc_task_rest_run_01wf/bold confounds_wf/tcompcor/mask000.nii.gz', '/bcbl/home/public/HBP MaiteCesar/FMRIPREP_work_fmap/fmriprep_wf/singlesubject 08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_confounds_wf/acc_tfm/

highres001_N4Corrected0_masked_prob_0_tpmsum_roi_trans_boldmsk.nii.gz'] masked = False out_report = report.svg

Traceback (most recent call last): File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 68, in run_node result['result'] = node.run(updatehash=updatehash) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/ nipype/pipeline/engine/nodes.py", line 487, in run result = self._run_interface(execute=True) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 571, in _run_interface return self._run_command(execute) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/ nipype/pipeline/engine/nodes.py", line 650, in _run_command result = self._interface.run(cwd=outdir) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/nipype/interfaces/base/core.py", line 510, in run runtime = self._run_interface(runtime) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/interfaces/masks.py",

line 268, in _run_interface compress=self.inputs.compress_report File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 266, in plot_segs **plot_params) File "/opt/anaconda3/lib/python3.6/ site-packages/niworkflows/viz/utils.py", line 309, in _plot_anat_with_contours svg = extract_svg(display, compress=compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 181, in extract_svg image_svg = svg_compress(image_svg, compress) File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 105, in svg_compress raise RuntimeError('Compression is required, but svgo or cwebp are not installed')

RuntimeError: Compression is required, but svgo or cwebp are not installed

Thanks for your help,

Maite

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/poldracklab/fmriprep/issues/969, or mute the thread https://github.com/notifications/unsubscribe- auth/AAOkpyGmqD-1gjWRtsNLneR1-jxRAnhxks5tUECagaJpZM4SCMM3 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or mute the thread .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/poldracklab/fmriprep/issues/969#issuecomment-365209834, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOkp38Sw7mtWvKcdQpr5d22VNDnpbwcks5tUVo8gaJpZM4SCMM3 .

oesteban commented 6 years ago

Hi @mainux, you need both. I've opened #977. Thanks for the feedback.

Like Chris suggested, please have a look at Singularity.

danlurie commented 6 years ago

For those who can't use Docker or Singularity: I was able to resolve this issue by installing these packages manually.

svgo can be installed using NPM. If you use conda, the steps are

conda install nodejs
npm install -g svgo

Precompiled binaries of the webp tools can be downloaded from Google. Unpack the tarball and point your PATH to the ../bin folder and you should be good to go.