-
Notifications
You must be signed in to change notification settings - Fork 12
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
crash in report_wf.plt_defaced when subjects have differing number of sessions #69
Open
BarnardVisionLab opened this issue
Feb 6, 2023
· 2 comments
· May be fixed by fcbg-md/BIDSonym#1 or #83
Open
crash in report_wf.plt_defaced when subjects have differing number of sessions #69
BarnardVisionLab opened this issue
Feb 6, 2023
· 2 comments
· May be fixed by fcbg-md/BIDSonym#1 or #83
Labels
bug
Something isn't working
Comments
vferat
added a commit
to fcbg-md/BIDSonym
that referenced
this issue
May 25, 2023
Move sessions_to_analyze from study level to subject level
Draft
I am still getting that error, was there any fix that was found?? |
PeerHerholz
added a commit
that referenced
this issue
Oct 24, 2023
Merged
confirming still seeing this one with the flagman version
well, it is from
although not sure if issue exactly the same since for those 2 subjects I invoked for there is identical number of sessions:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hello, in running BIDSonym for the first time, we found a bug that we think is caused by having subjects with differing numbers of sessions.
In our dataset, one subject had 3 sessions and the rest had 2. When we first ran BIDSonym, it crashed in plt_defaced. That happened when trying to run it on just 1 subject or on the whole dataset directory.
The text output to the terminal describing the error is below. But I was able to get past it by simply moving out of the data set the one subject that has 3 sessions. So it seems like the code first determines the number of sessions per subject, assuming they are all the same (the max). The code generating the report and images for each subject tries to loop through all the sessions, and crashes if one file can't be found. Ideally it would check how many sessions each individual subject has.
In any case, thanks for making a great tool! Very useful.
Here is the terminal output, starting with the first mention of a warning:
230206-16:49:41,117 nipype.workflow WARNING:
[Node] Error on "report_wf.plt_defaced" (/tmp/tmpf3cku5x4/report_wf/plt_defaced)
230206-16:49:41,125 nipype.workflow ERROR:
Node plt_defaced failed to run on host 30f06d8dbdb0.
230206-16:49:41,126 nipype.workflow ERROR:
Saving crash info to /tmp/crash-20230206-164941-root-plt_defaced-5925e894-9235-4be7-a066-691072b2d10f.pklz
Traceback (most recent call last):
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/plugins/linear.py", line 46, in run
node.run(updatehash=updatehash)
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
result = self._run_interface(execute=True)
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
return self._run_command(execute)
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
result = self._interface.run(cwd=outdir)
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 434, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "", line 70, in plot_defaced
UnboundLocalError: local variable 't1w' referenced before assignment
230206-16:49:41,137 nipype.workflow INFO:
***********************************
230206-16:49:41,137 nipype.workflow ERROR:
could not run node: report_wf.plt_defaced
230206-16:49:41,137 nipype.workflow INFO:
crashfile: /tmp/crash-20230206-164941-root-plt_defaced-5925e894-9235-4be7-a066-691072b2d10f.pklz
230206-16:49:41,137 nipype.workflow INFO:
***********************************
Traceback (most recent call last):
File "/opt/miniconda-latest/envs/bidsonym/bin/bidsonym", line 33, in
sys.exit(load_entry_point('bidsonym', 'console_scripts', 'bidsonym')())
File "/home/bm/bidsonym/run_deeid.py", line 180, in run_deeid
create_graphics(args.bids_dir, subject_label, session=session, t2w=None)
File "/home/bm/bidsonym/reports.py", line 184, in create_graphics
report_wf.run()
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/workflows.py", line 632, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/plugins/linear.py", line 70, in run
report_nodes_not_run(notrun)
File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/plugins/tools.py", line 98, in report_nodes_not_run
("Workflow did not execute cleanly. " "Check log for details")
RuntimeError: Workflow did not execute cleanly. Check log for details
To Reproduce
We tried running this command:
docker run -it --rm -v {directory_name}/:/bids_dataset -v /home/alwhite/engram/tmp/:/tmp peerherholz/bidsonym /bids_dataset group --deid pydeface --brainextraction bet --bet_frac 0.5 --skip_bids_validation
where {directory_name} is the full address of the BIDS directory.
Expected behavior
We expected the software to continue through all subjects in the directory.
OS/environment (please provide precise information on your OS/environment):
We are running this code in Linux Ubuntu 20.04.3 LTS, Docker version 20.10.12.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: