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

Reports fail for models with only first-level analysis #366

Open
shashankbansal6 opened this issue May 5, 2022 · 0 comments
Open

Reports fail for models with only first-level analysis #366

shashankbansal6 opened this issue May 5, 2022 · 0 comments
Labels

Comments

@shashankbansal6
Copy link
Collaborator

shashankbansal6 commented May 5, 2022

Environment

  • Python version: 3.8
  • fitlins version: 0.10.1

Expected Behavior

Reports should work the same for models with only first-level analysis.

Observed Behavior

This model fails with the following errors:

Traceback (most recent call last):
  File "/Users/shashankbansal/miniconda/envs/spm_tuto/bin/fitlins", line 8, in <module>
    sys.exit(main())
  File "/Users/shashankbansal/miniconda/envs/spm_tuto/lib/python3.8/site-packages/fitlins/cli/run.py", line 432, in main
    sys.exit(run_fitlins(sys.argv[1:]))
  File "/Users/shashankbansal/miniconda/envs/spm_tuto/lib/python3.8/site-packages/fitlins/cli/run.py", line 425, in run_fitlins
    report_dict = build_report_dict(deriv_dir, work_dir, graph)
  File "/Users/shashankbansal/miniconda/envs/spm_tuto/lib/python3.8/site-packages/fitlins/viz/reports.py", line 130, in build_report_dict
    {analysis_dict['entities']['subject'] for analysis_dict in report['nodes'][0]['analyses']}
  File "/Users/shashankbansal/miniconda/envs/spm_tuto/lib/python3.8/site-packages/fitlins/viz/reports.py", line 130, in <setcomp>
    {analysis_dict['entities']['subject'] for analysis_dict in report['nodes'][0]['analyses']}
KeyError: 'subject'

This is because fitlins report generation is hard-coded to expect a subject level node.

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

2 participants