Skip to content
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

🐛🐍 "Module CerebrospinalFluid_mean has no output called stats" #1201

Closed
shnizzedy opened this issue Feb 18, 2020 · 9 comments
Closed
Labels

Comments

@shnizzedy
Copy link
Member

In 0e7db8c, I'm getting the following error every time I run test_config:

200218-22:29:47,996 nipype.utils INFO:
	 No new version available.
Traceback (most recent call last):
  File "/code/run.py", line 587, in <module>
    test_config = 1 if args.analysis_level == "test_config" else 0
  File "/code/CPAC/pipeline/cpac_runner.py", line 341, in run
    p_name, plugin, plugin_args, test_config)
  File "/code/CPAC/pipeline/cpac_pipeline.py", line 2540, in prep_workflow
    name='nuisance_regressor_{0}_{1}'.format(regressors_selector_i, num_strat)
  File "/code/CPAC/nuisance/nuisance.py", line 1303, in create_regressor_workflow
    build_nuisance_regressors, regressor_arg
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/workflows.py", line 236, in connect
    raise Exception("\n".join(["Some connections were not found"] + infostr))
Exception: Some connections were not found
Module CerebrospinalFluid_mean has no output called stats

I don't get this error running 3f22187, so I think this problem is in either the Python 2 → 3 / Ubuntu 16 → 18 upgrade.

AFNI took some massaging to get to work in this upgrade, so I wouldn't be surprised if another tool is working not as expected. The 2 → 3 changes are huge as well, so there's also a good chance the problem is there.

What software should be generating CerebrospinalFluid_mean stats?

@shnizzedy shnizzedy added the bug label Feb 18, 2020
@anibalsolon
Copy link
Member

This is the CerebrospinalFluid_mean:

mean_node = pe.Node(
afni.ROIStats(quiet=False, args='-1Dformat'),
name='{}_mean'.format(regressor_type)
)
nuisance_wf.connect(
summary_method_input[0], summary_method_input[1],
mean_node, 'in_file'
)
nuisance_wf.connect(
union_masks_paths, 'out_file',
mean_node, 'mask'
)
summary_method_input = (mean_node, 'stats')

I guess you have updated the Nipype version, in which the 'stats' output attribute is now called 'out_file':

nipy/nipype@05c056c#diff-851b9f467ed8042d29a89dbd00b754dfL1820-R1897

@shnizzedy
Copy link
Member Author

Thanks! 🙏

That's probably it! I unlocked all the Python package versions to build this new Python3-based image. I'll re-lock everything that's Py3 to what we had before, try again, and then if it all seems to work lock what's left.

@shnizzedy
Copy link
Member Author

If we want to upgrade Nipype, we can decide that, but I think that's beyond the scope of this upgrade

@anibalsolon
Copy link
Member

You are right, outside the scope, the port to Py3 can bring several problems already. No need to include a new variable.

@shnizzedy
Copy link
Member Author

Resolved in 8c659d1

@shnizzedy
Copy link
Member Author

😬 maybe this is not well-resolved. Now I'm getting empty CerebrospinalFluid_mean/roi_stats.csv files:

ValueError: Number of time points in /tmp/resting_preproc_sub-0025427_ses-3/nuisance_regressor_0_0/_scan_rest_run-1/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/CerebrospinalFluid_mean/roi_stats.csv (0) is inconsistent with length of functional file /tmp/resting_preproc_sub-0025427_ses-3/func_preproc_afni_3dvolreg_0/_scan_rest_run-1/func_normalize/sub-0025427_ses-3_task-rest_run-1_bold_calc_tshift_resample_volreg_calc_maths.nii.gz (300)

ValueError: Number of time points in /tmp/resting_preproc_sub-0025427_ses-3/nuisance_regressor_1_0/_scan_rest_run-1/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_M-SDB_P-2_BP-B0.01-T0.1/CerebrospinalFluid_mean/roi_stats.csv (0) is inconsistent with length of functional file /tmp/resting_preproc_sub-0025427_ses-3/func_preproc_afni_3dvolreg_0/_scan_rest_run-1/func_normalize/sub-0025427_ses-3_task-rest_run-1_bold_calc_tshift_resample_volreg_calc_maths.nii.gz (300)

@shnizzedy shnizzedy reopened this Feb 21, 2020
@pn2200
Copy link
Contributor

pn2200 commented Feb 24, 2020

Is this the same issue as #1140?

@shnizzedy
Copy link
Member Author

Is this the same issue as #1140?

They might be related, but this issue is occurring exclusively on the upgrade/python3 branch while #1140 seems to be occurring in Python 2 as well

@sgiavasis
Copy link
Collaborator

I believe this can be removed as a blocker for the Python 3 PR.

shnizzedy added a commit that referenced this issue Nov 20, 2020
Squashed commit of the following:

commit 55f54946d960ffc98b8275ebf9c30674cf5214a5
Author: Jon Clucas <jon@vasegurt.com>
Date:   Fri Nov 20 13:41:22 2020 -0500

    :construction_worker: Kick the can for Singularity 3

commit 71a9bcd
Author: Jon Clucas <jon@vasegurt.com>
Date:   Fri Nov 20 09:29:34 2020 -0500

    :construction_worker: C-PAC-CI.simg → cpac_singularity_image.simg

commit 44720ad
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Nov 19 18:01:37 2020 -0500

    :rewind: Revert 8da3d3b

commit 8da3d3b
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Nov 19 15:01:06 2020 -0500

    :construction_worker: Use $HOME

commit 8bfee04
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Nov 19 12:48:53 2020 -0500

    :construction_worker: `cd` into `project` after attaching workspace

commit 1f0370e
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Nov 19 10:41:39 2020 -0500

    :construction_worker: Parameterize libssl version

commit 77bb373
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Nov 19 09:50:07 2020 -0500

    :construction_worker: Paramaterize Singularity requirements & persist more to workspace

commit f28937b
Author: Jon Clucas <jon@vasegurt.com>
Date:   Wed Nov 18 11:59:14 2020 -0500

    :construction_worker: Use Xenial Xerus for Singularity 2

commit ef061e0
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Nov 16 13:26:09 2020 -0500

    :construction_worker: Upgrade image for running test runs

commit d503612
Author: Jon Clucas <jon@vasegurt.com>
Date:   Wed Oct 28 12:27:41 2020 -0400

    :arrow_up: Upgrade libssl (1.1 ← 1.0.0)

commit 3172277
Author: Jon Clucas <jon@vasegurt.com>
Date:   Tue Aug 25 12:59:33 2020 -0400

    :yellow_heart: Fix path to .coverage files

commit a464760
Author: Jon Clucas <jon@vasegurt.com>
Date:   Tue Aug 25 09:42:01 2020 -0400

    :construction_worker: Install coverage even if just printing a warning

commit 137c1a5
Author: Jon Clucas <jon@vasegurt.com>
Date:   Tue Aug 25 08:21:14 2020 -0400

    :construction_worker: Set no_output_timeout on run jobs

commit 473e0b8
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Aug 24 17:12:57 2020 -0400

    :pencil: Correct name of run_command.sh in Circle config

commit 1c5a5e0
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Aug 24 16:05:16 2020 -0400

    :construction_worker: Ignore test_install when testing in images

commit cac3993
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Aug 24 14:18:34 2020 -0400

    :construction_worker: Send warning through Python to generate coveragefile to persist

commit a7c252f
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Aug 24 13:22:09 2020 -0400

    :construction_worker: Bind dev/circleci_data in testing images

commit d931025
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Aug 24 11:31:38 2020 -0400

    :construction_worker: Set testing root to /code/CPAC

commit 56073bf
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Aug 24 11:31:02 2020 -0400

    :construction_worker: Bind $PWD to /code for testing containers

commit 4ced73c
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Aug 24 09:44:00 2020 -0400

    :rocket: Make run_command.sh executable

commit 74dae1b
Author: Jon Clucas <jon@vasegurt.com>
Date:   Fri Aug 21 15:44:44 2020 -0400

    :construction_worker: More abstraction to run tests in both Docker and Singularity

commit 7bdf0df
Author: Jon Clucas <jon@vasegurt.com>
Date:   Fri Aug 21 13:48:17 2020 -0400

    :wrench: Run coverage as module

commit f1d4b06
Author: Jon Clucas <jon@vasegurt.com>
Date:   Fri Aug 21 13:40:13 2020 -0400

    :wrench: Configure pytest

commit 193e6c5
Author: Jon Clucas <jon@vasegurt.com>
Date:   Fri Aug 21 11:37:42 2020 -0400

    :construction_worker: Install Circle requirements on Circle

commit 0ee43d5
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Aug 20 15:53:29 2020 -0400

    :green_heart: Generalize test run script

commit c9964a4
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Aug 20 17:07:54 2020 -0400

    :heavy_plus_sign: Require PyYAML for CircleCI

commit 91df2f0
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Aug 20 14:28:33 2020 -0400

    :microscope: Test one random preconfig/subject per plaform

commit ad46175
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Aug 20 11:17:44 2020 -0400

    :microscope: Run unit tests in Singularity

commit cd4b60a
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Aug 20 11:06:44 2020 -0400

    :construction_worker: Upgrade Circle config to v2.1

commit 6eadaed
Merge: cc7a10b bf8f5bf
Author: Steve Giavasis <sgiava77@gmail.com>
Date:   Fri Nov 6 15:37:51 2020 -0500

    Merge pull request #1386 from FCP-INDI/docs/DOT-graphs

    📝 Restore broken DOT graphs in docstrings

commit cc7a10b
Merge: f136ed8 3e8c31f
Author: Steve Giavasis <sgiava77@gmail.com>
Date:   Fri Nov 6 15:07:44 2020 -0500

    Merge pull request #1392 from FCP-INDI/upgrade/nipype-1.5.1

    ⬆️ Upgrade Nipype to v1.5.1 (from 1.1.2)

commit 3e8c31f
Author: shnizzedy @ CircleCI <shnizzedy@users.noreply.github.com>
Date:   Mon Nov 2 21:35:36 2020 +0000

    :bookmark: Update version to 1.7.3.dev (:bookmark: Set semver to 1.7.3.dev)

commit b072f9c
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Nov 2 16:30:27 2020 -0500

    :bookmark: Set semver to 1.7.3.dev

commit 2c0f4f0
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Oct 29 12:19:47 2020 -0400

    :wrench: Simplify dev tags in files

    * :speech_balloon: Exclude hash (just "{semver}.dev" instead of "{semver}.{hash}-dev")
    * :rewind: Revert ":rocket: Drop older version bump commits before adding new one"
    * :rocket: Include previous commit message when bumping version tags
    * :wrench: Add helper scripts for merging with divergent tags

    This reverts commit 4f635d5.

commit 2d282fd
Author: Jon Clucas <jon@vasegurt.com>
Date:   Fri Oct 30 11:00:39 2020 -0400

    :alien: Update roifile extension from `.csv` to `.1D` for Nipype upgrade

    Ref nipy/nipype@05c056c#diff-04659959460e7013d2440d1a36e14a25bc69425b4f5b39d53c5d62e7c5130e70L1820 / nipy/nipype@05c056c#diff-04659959460e7013d2440d1a36e14a25bc69425b4f5b39d53c5d62e7c5130e70R1887-R1893

commit 3e507cc
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Oct 29 11:32:40 2020 -0400

    :alembic: :rewind: Revert 1328 for Nipype upgrade

commit da72c6e
Author: Jon Clucas <jon@vasegurt.com>
Date:   Wed Oct 28 14:47:16 2020 -0400

    :alien: Update `mask` → `mask_file` for Nipype upgrade

commit 81bdc3d
Author: Jon Clucas <jon@vasegurt.com>
Date:   Wed Oct 28 12:27:41 2020 -0400

    :arrow_up: Upgrade libssl (1.1 ← 1.0.0)

commit d1be7c5
Author: Jon Clucas <jon@vasegurt.com>
Date:   Wed Oct 28 11:32:19 2020 -0400

    :green_heart: Specify machine image: Ubuntu 20.04, Docker v19.03.13, Docker Compose v1.27.4

commit bf71245
Author: Jon Clucas <jon@vasegurt.com>
Date:   Tue Oct 27 14:57:49 2020 -0400

    :green_heart: Upgrade pyenv before upgrading Python

commit 5a5405d
Author: Jon Clucas <jon@vasegurt.com>
Date:   Tue Oct 27 13:32:21 2020 -0400

    :alien: Update `stats` → `out_file` for Nipype upgrade

    Ref #1201 (comment)

commit 077272f
Author: Jon Clucas <jon@vasegurt.com>
Date:   Tue Oct 27 10:19:16 2020 -0400

    :arrow_up: Upgrade Python (3.9.0 ← 3.6.3)

commit 94a63ec
Author: Jon Clucas <jon@vasegurt.com>
Date:   Mon Oct 26 16:15:57 2020 -0400

    :arrow_up: Upgrade Nipype 1.5.1 (← 1.1.2)

commit bf8f5bf
Author: Jon Clucas <jon@vasegurt.com>
Date:   Thu Oct 22 14:49:16 2020 -0400

    :memo: Restore broken DOT graphs in docstrings
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

4 participants