diff --git a/fmriprep/interfaces/reports.py b/fmriprep/interfaces/reports.py index d5d5b4573..bcc81416c 100644 --- a/fmriprep/interfaces/reports.py +++ b/fmriprep/interfaces/reports.py @@ -169,10 +169,9 @@ def _generate_segment(self): if counts: header = '\t\t' + s = '' if n_runs == 1 else 's' lines = [ - '\t\t\t
  • Task: {task_id} ({n_runs:d} run{s})
  • '.format( - task_id=task_id, n_runs=n_runs, s='' if n_runs == 1 else 's' - ) + f'\t\t\t
  • Task: {task_id} ({n_runs:d} run{s})
  • ' for task_id, n_runs in sorted(counts.items()) ] tasks = '\n'.join([header] + lines + [footer]) diff --git a/fmriprep/workflows/base.py b/fmriprep/workflows/base.py index 6883bbf14..0628d48d7 100644 --- a/fmriprep/workflows/base.py +++ b/fmriprep/workflows/base.py @@ -215,12 +215,10 @@ def init_single_subject_wf(subject_id: str): anat_only = config.workflow.anat_only # Make sure we always go through these two checks if not anat_only and not subject_data['bold']: - task_id = config.execution.task_id + task_id = config.execution.task_id or '' raise RuntimeError( - 'No BOLD images found for participant {} and task {}. ' - 'All workflows require BOLD images.'.format( - subject_id, task_id if task_id else '' - ) + f'No BOLD images found for participant {subject_id} and ' + f'task {task_id}. All workflows require BOLD images.' ) bold_runs = [