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

[BUG] KeyError: ['NbDisplacementOutliers', 'NbXOutliers', 'NbYOutliers', 'eye1XVar', 'eye1YVar'] not in index #171

Closed
1 task done
Michael-Sun opened this issue Sep 19, 2023 · 0 comments · Fixed by #217
Labels
bug Something isn't working
Milestone

Comments

@Michael-Sun
Copy link

Michael-Sun commented Sep 19, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Expected Behavior

bidsmreye --action qc summarizes or performs qc on existing processed files.

Current Behavior

Currently, it looks like if a preceding --action all command was killed midway, --action qc produces a KeyError

Error message

2023-09-19 07:53:34.045525: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/deepmreye/preprocess.py:546: RuntimeWarning:

Mean of empty slice

/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/numpy/lib/nanfunctions.py:1872: RuntimeWarning:

Degrees of freedom <= 0 for slice.

/var/spool/slurmd/job7733470/slurm_script: line 61: 29168 Killed                  bidsmreye --action all ${bids_dir} ${output_dir} participant --participant_label ${SUBJ} --space MNI152NLin2009cAsym -v
2023-09-19 08:59:55.950946: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
+------------------------------- Traceback (most recent call last) --------------------------------+
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/bin/bidsmreye:8 in <module>       |
|                                                                                                  |
|   5 from bidsmreye.bidsmreye import cli                                                          |
|   6 if __name__ == '__main__':                                                                   |
|   7     sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         |
| \u2771 8     sys.exit(cli())                                                                          |
|   9                                                                                              |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| | cli = <function cli at 0x2aaf30c5e0d0>                                                       | |
| |  re = <module 're' from                                                                      | |
| |       '/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/re.py'>  | |
| | sys = <module 'sys' (built-in)>                                                              | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/bidsm |
| reye/bidsmreye.py:54 in cli                                                                      |
|                                                                                                  |
|    51         log_level = min(len(log_levels()) - 1, max(log_level + adjustment, 0))             |
|    52     log_level_name = log_levels()[log_level]                                               |
|    53                                                                                            |
| \u2771  54     bidsmreye(                                                                             |
|    55         bids_dir=args.bids_dir,                                                            |
|    56         output_dir=args.output_dir,                                                        |
|    57         analysis_level=args.analysis_level,                                                |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| |     adjustment = -1                                                                          | |
| |           args = Namespace(bids_dir='/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/deriva\u2026 | |
| |                  output_dir='/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/de\u2026 | |
| |                  analysis_level='group', action='qc', participant_label=['SID001684'],       | |
| |                  task=None, run=None, space=['MNI152NLin2009cAsym'], log_level=[-1],         | |
| |                  debug=False, reset_database=False, bids_filter_file=None,                   | |
| |                  non_linear_coreg=False, model='1to6')                                       | |
| |           argv = [                                                                           | |
| |                      '/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/bin/bi\u2026 | |
| |                      '--action',                                                             | |
| |                      'qc',                                                                   | |
| |                      '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/fmriprep-\u2026 | |
| |                      '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye\u2026 | |
| |                      'group',                                                                | |
| |                      '--participant_label',                                                  | |
| |                      'SID001684',                                                            | |
| |                      '--space',                                                              | |
| |                      'MNI152NLin2009cAsym',                                                  | |
| |                      ... +1                                                                  | |
| |                  ]                                                                           | |
| |      log_level = 1                                                                           | |
| | log_level_name = 'INFO'                                                                      | |
| |         parser = MuhParser(prog='bidsmreye', usage=None, description='BIDS app using         | |
| |                  deepMReye to decode eye motion for fMRI time series data.',                 | |
| |                  formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', | |
| |                  add_help=True)                                                              | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/bidsm |
| reye/bidsmreye.py:129 in bidsmreye                                                               |
|                                                                                                  |
|   126     if action in {"all", "generalize"} and isinstance(cfg.model_weights_file, str):        |
|   127         cfg.model_weights_file = download(cfg.model_weights_file)                          |
|   128                                                                                            |
| \u2771 129     dispatch(analysis_level=analysis_level, action=action, cfg=cfg)                        |
|   130                                                                                            |
|   131                                                                                            |
|   132 def dispatch(analysis_level: str, action: str, cfg: Config) -> None:                       |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| |             action = 'qc'                                                                    | |
| |     analysis_level = 'group'                                                                 | |
| |           bids_dir = '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/fmriprep-\u2026 | |
| |        bids_filter = None                                                                    | |
| |   bids_filter_file = None                                                                    | |
| |                cfg = Config(                                                                 | |
| |                          input_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASA\u2026 | |
| |                          output_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WAS\u2026 | |
| |                          subjects=['SID001684'],                                             | |
| |                          space=['MNI152NLin2009cAsym'],                                      | |
| |                          task=[                                                              | |
| |                              'movemap',                                                      | |
| |                              'pinellocalizer',                                               | |
| |                              'bodymapST2',                                                   | |
| |                              'hyperalignment',                                               | |
| |                              'bodymapST1',                                                   | |
| |                              'distractmap',                                                  | |
| |                              'acceptmapXexperience',                                         | |
| |                              'acceptmapXregulate',                                           | |
| |                              'acceptmap1Xexperience',                                        | |
| |                              'acceptmap1Xpostexp',                                           | |
| |                              ... +5                                                          | |
| |                          ],                                                                  | |
| |                          run=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... +3],                        | |
| |                          model_weights_file='1to6',                                          | |
| |                          bids_filter={                                                       | |
| |                              'bold': {                                                       | |
| |                                  'datatype': 'func',                                         | |
| |                                  'desc': 'preproc',                                          | |
| |                                  'suffix': '^bold$',                                         | |
| |                                  'extension': 'nii.*'                                        | |
| |                              },                                                              | |
| |                              'mask': {'suffix': 'mask', 'extension': 'p'},                   | |
| |                              'no_label': {                                                   | |
| |                                  'desc': 'nolabel',                                          | |
| |                                  'suffix': '^bidsmreye$$',                                   | |
| |                                  'extension': 'npz'                                          | |
| |                              },                                                              | |
| |                              'eyetrack': {'suffix': '^eyetrack$$', 'extension': 'tsv'},      | |
| |                              'eyetrack_qc': {                                                | |
| |                                  'suffix': '^eyetrack$$',                                    | |
| |                                  'extension': 'json',                                        | |
| |                                  'task':                                                     | |
| |                      '^movemap$|^pinellocalizer$|^bodymapST2$|^hyperalignment$|^bodymapST1$\u2026 | |
| |                                  'subject': ['SID001684'],                                   | |
| |                                  'run': '1|2|3|4|5|6|7|8|9|10|11|12|13'                      | |
| |                              }                                                               | |
| |                          },                                                                  | |
| |                          debug=False,                                                        | |
| |                          reset_database=False,                                               | |
| |                          non_linear_coreg=False                                              | |
| |                      )                                                                       | |
| |              debug = False                                                                   | |
| |     log_level_name = 'INFO'                                                                  | |
| | model_weights_file = '1to6'                                                                  | |
| |   non_linear_coreg = False                                                                   | |
| |         output_dir = '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye' | |
| |  participant_label = ['SID001684']                                                           | |
| |     reset_database = False                                                                   | |
| |                run = None                                                                    | |
| |              space = ['MNI152NLin2009cAsym']                                                 | |
| |               task = None                                                                    | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/bidsm |
| reye/bidsmreye.py:135 in dispatch                                                                |
|                                                                                                  |
|   132 def dispatch(analysis_level: str, action: str, cfg: Config) -> None:                       |
|   133     if analysis_level == "group":                                                          |
|   134         if action == "qc":                                                                 |
| \u2771 135             group_report(cfg=cfg)                                                          |
|   136         else:                                                                              |
|   137             log.error("Unknown group level action")                                        |
|   138             sys.exit(1)                                                                    |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| |         action = 'qc'                                                                        | |
| | analysis_level = 'group'                                                                     | |
| |            cfg = Config(                                                                     | |
| |                      input_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/d\u2026 | |
| |                      output_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/\u2026 | |
| |                      subjects=['SID001684'],                                                 | |
| |                      space=['MNI152NLin2009cAsym'],                                          | |
| |                      task=[                                                                  | |
| |                          'movemap',                                                          | |
| |                          'pinellocalizer',                                                   | |
| |                          'bodymapST2',                                                       | |
| |                          'hyperalignment',                                                   | |
| |                          'bodymapST1',                                                       | |
| |                          'distractmap',                                                      | |
| |                          'acceptmapXexperience',                                             | |
| |                          'acceptmapXregulate',                                               | |
| |                          'acceptmap1Xexperience',                                            | |
| |                          'acceptmap1Xpostexp',                                               | |
| |                          ... +5                                                              | |
| |                      ],                                                                      | |
| |                      run=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... +3],                            | |
| |                      model_weights_file='1to6',                                              | |
| |                      bids_filter={                                                           | |
| |                          'bold': {                                                           | |
| |                              'datatype': 'func',                                             | |
| |                              'desc': 'preproc',                                              | |
| |                              'suffix': '^bold$',                                             | |
| |                              'extension': 'nii.*'                                            | |
| |                          },                                                                  | |
| |                          'mask': {'suffix': 'mask', 'extension': 'p'},                       | |
| |                          'no_label': {                                                       | |
| |                              'desc': 'nolabel',                                              | |
| |                              'suffix': '^bidsmreye$$',                                       | |
| |                              'extension': 'npz'                                              | |
| |                          },                                                                  | |
| |                          'eyetrack': {'suffix': '^eyetrack$$', 'extension': 'tsv'},          | |
| |                          'eyetrack_qc': {                                                    | |
| |                              'suffix': '^eyetrack$$',                                        | |
| |                              'extension': 'json',                                            | |
| |                              'task':                                                         | |
| |                  '^movemap$|^pinellocalizer$|^bodymapST2$|^hyperalignment$|^bodymapST1$|^di\u2026 | |
| |                              'subject': ['SID001684'],                                       | |
| |                              'run': '1|2|3|4|5|6|7|8|9|10|11|12|13'                          | |
| |                          }                                                                   | |
| |                      },                                                                      | |
| |                      debug=False,                                                            | |
| |                      reset_database=False,                                                   | |
| |                      non_linear_coreg=False                                                  | |
| |                  )                                                                           | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/bidsm |
| reye/visualize.py:140 in group_report                                                            |
|                                                                                                  |
|   137     :return: Figure object                                                                 |
|   138     :rtype: Any                                                                            |
|   139     """                                                                                    |
| \u2771 140     qc_data = collect_group_qc_data(cfg)                                                   |
|   141                                                                                            |
|   142     fig = go.FigureWidget(                                                                 |
|   143         make_subplots(                                                                     |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| | cfg = Config(                                                                                | |
| |           input_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/\u2026 | |
| |           output_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives\u2026 | |
| |           subjects=['SID001684'],                                                            | |
| |           space=['MNI152NLin2009cAsym'],                                                     | |
| |           task=[                                                                             | |
| |               'movemap',                                                                     | |
| |               'pinellocalizer',                                                              | |
| |               'bodymapST2',                                                                  | |
| |               'hyperalignment',                                                              | |
| |               'bodymapST1',                                                                  | |
| |               'distractmap',                                                                 | |
| |               'acceptmapXexperience',                                                        | |
| |               'acceptmapXregulate',                                                          | |
| |               'acceptmap1Xexperience',                                                       | |
| |               'acceptmap1Xpostexp',                                                          | |
| |               ... +5                                                                         | |
| |           ],                                                                                 | |
| |           run=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... +3],                                       | |
| |           model_weights_file='1to6',                                                         | |
| |           bids_filter={                                                                      | |
| |               'bold': {                                                                      | |
| |                   'datatype': 'func',                                                        | |
| |                   'desc': 'preproc',                                                         | |
| |                   'suffix': '^bold$',                                                        | |
| |                   'extension': 'nii.*'                                                       | |
| |               },                                                                             | |
| |               'mask': {'suffix': 'mask', 'extension': 'p'},                                  | |
| |               'no_label': {                                                                  | |
| |                   'desc': 'nolabel',                                                         | |
| |                   'suffix': '^bidsmreye$$',                                                  | |
| |                   'extension': 'npz'                                                         | |
| |               },                                                                             | |
| |               'eyetrack': {'suffix': '^eyetrack$$', 'extension': 'tsv'},                     | |
| |               'eyetrack_qc': {                                                               | |
| |                   'suffix': '^eyetrack$$',                                                   | |
| |                   'extension': 'json',                                                       | |
| |                   'task':                                                                    | |
| |       '^movemap$|^pinellocalizer$|^bodymapST2$|^hyperalignment$|^bodymapST1$|^distractm'+17\u2026 | |
| |                   'subject': ['SID001684'],                                                  | |
| |                   'run': '1|2|3|4|5|6|7|8|9|10|11|12|13'                                     | |
| |               }                                                                              | |
| |           },                                                                                 | |
| |           debug=False,                                                                       | |
| |           reset_database=False,                                                              | |
| |           non_linear_coreg=False                                                             | |
| |       )                                                                                      | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/bidsm |
| reye/visualize.py:92 in collect_group_qc_data                                                    |
|                                                                                                  |
|    89         "eye1XVar",                                                                        |
|    90         "eye1YVar",                                                                        |
|    91     ]                                                                                      |
| \u2771  92     qc_data = qc_data[cols]  # type: ignore                                                |
|    93                                                                                            |
|    94     return qc_data                                                                         |
|    95                                                                                            |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| |          bf = [                                                                              | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bi\u2026 | |
| |                   ... +10                                                                    | |
| |               ]                                                                              | |
| |         cfg = Config(                                                                        | |
| |                   input_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/deri\u2026 | |
| |                   output_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/der\u2026 | |
| |                   subjects=['SID001684'],                                                    | |
| |                   space=['MNI152NLin2009cAsym'],                                             | |
| |                   task=[                                                                     | |
| |                       'movemap',                                                             | |
| |                       'pinellocalizer',                                                      | |
| |                       'bodymapST2',                                                          | |
| |                       'hyperalignment',                                                      | |
| |                       'bodymapST1',                                                          | |
| |                       'distractmap',                                                         | |
| |                       'acceptmapXexperience',                                                | |
| |                       'acceptmapXregulate',                                                  | |
| |                       'acceptmap1Xexperience',                                               | |
| |                       'acceptmap1Xpostexp',                                                  | |
| |                       ... +5                                                                 | |
| |                   ],                                                                         | |
| |                   run=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... +3],                               | |
| |                   model_weights_file='1to6',                                                 | |
| |                   bids_filter={                                                              | |
| |                       'bold': {                                                              | |
| |                           'datatype': 'func',                                                | |
| |                           'desc': 'preproc',                                                 | |
| |                           'suffix': '^bold$',                                                | |
| |                           'extension': 'nii.*'                                               | |
| |                       },                                                                     | |
| |                       'mask': {'suffix': 'mask', 'extension': 'p'},                          | |
| |                       'no_label': {                                                          | |
| |                           'desc': 'nolabel',                                                 | |
| |                           'suffix': '^bidsmreye$$',                                          | |
| |                           'extension': 'npz'                                                 | |
| |                       },                                                                     | |
| |                       'eyetrack': {'suffix': '^eyetrack$$', 'extension': 'tsv'},             | |
| |                       'eyetrack_qc': {                                                       | |
| |                           'suffix': '^eyetrack$$',                                           | |
| |                           'extension': 'json',                                               | |
| |                           'task':                                                            | |
| |               '^movemap$|^pinellocalizer$|^bodymapST2$|^hyperalignment$|^bodymapST1$|^distr\u2026 | |
| |                           'subject': ['SID001684'],                                          | |
| |                           'run': '1|2|3|4|5|6|7|8|9|10|11|12|13'                             | |
| |                       }                                                                      | |
| |                   },                                                                         | |
| |                   debug=False,                                                               | |
| |                   reset_database=False,                                                      | |
| |                   non_linear_coreg=False                                                     | |
| |               )                                                                              | |
| |        cols = [                                                                              | |
| |                   'subject',                                                                 | |
| |                   'filename',                                                                | |
| |                   'NbDisplacementOutliers',                                                  | |
| |                   'NbXOutliers',                                                             | |
| |                   'NbYOutliers',                                                             | |
| |                   'eye1XVar',                                                                | |
| |                   'eye1YVar'                                                                 | |
| |               ]                                                                              | |
| |        data = {                                                                              | |
| |                   'SamplingFrequency': 2.173913004042296,                                    | |
| |                   'Sources': [                                                               | |
| |                       'sub-SID001684/ses-03/func/sub-SID001684_ses-03_task-bodymapST2_acq-m\u2026 | |
| |                   ]                                                                          | |
| |               }                                                                              | |
| |          df =    SamplingFrequency                                            Sources        | |
| |               filename    subject                                                            | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |    entities = {                                                                              | |
| |                   'subject': 'SID001684',                                                    | |
| |                   'session': '03',                                                           | |
| |                   'task': 'bodymapST2',                                                      | |
| |                   'acquisition': 'mb8',                                                      | |
| |                   'run': 4,                                                                  | |
| |                   'space': 'T1w',                                                            | |
| |                   'desc': 'bidsmreye',                                                       | |
| |                   'suffix': 'eyetrack',                                                      | |
| |                   'datatype': 'func',                                                        | |
| |                   'extension': '.json'                                                       | |
| |               }                                                                              | |
| |           f = <_io.TextIOWrapper                                                             | |
| |               name='/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/b\u2026 | |
| |               mode='r' encoding='ISO-8859-1'>                                                | |
| |        file = '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bidsmr\u2026 | |
| |           i = 19                                                                             | |
| |      layout = BIDS Layout: ...erivatives/deepmreye/bidsmreye | Subjects: 10 | Sessions: 74 | | |
| |               Runs: 50                                                                       | |
| |     qc_data =    SamplingFrequency                                            Sources        | |
| |               filename    subject                                                            | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-02/func/trash/sub-SID001684...        | |
| |               sub-SID001684_ses-02_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-02/func/trash/sub-SID001684...        | |
| |               sub-SID001684_ses-02_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-02/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-02_task-pinellocalizer_acq-m...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-02/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-02_task-pinellocalizer_acq-m...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |               0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...        | |
| |               sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                   | |
| |    subjects = ['SID001684']                                                                  | |
| | this_filter = {                                                                              | |
| |                   'suffix': '^eyetrack$$',                                                   | |
| |                   'extension': 'json',                                                       | |
| |                   'task':                                                                    | |
| |               '^movemap$|^pinellocalizer$|^bodymapST2$|^hyperalignment$|^bodymapST1$|^distr\u2026 | |
| |                   'subject': ['SID001684'],                                                  | |
| |                   'run': '1|2|3|4|5|6|7|8|9|10|11|12|13'                                     | |
| |               }                                                                              | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/panda |
| s/core/frame.py:3767 in __getitem__                                                              |
|                                                                                                  |
|    3764         else:                                                                            |
|    3765             if is_iterator(key):                                                         |
|    3766                 key = list(key)                                                          |
| \u2771  3767             indexer = self.columns._get_indexer_strict(key, "columns")[1]                |
|    3768                                                                                          |
|    3769         # take() does not accept boolean indexers                                        |
|    3770         if getattr(indexer, "dtype", None) == bool:                                      |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| | is_single_key = False                                                                        | |
| |           key = [                                                                            | |
| |                     'subject',                                                               | |
| |                     'filename',                                                              | |
| |                     'NbDisplacementOutliers',                                                | |
| |                     'NbXOutliers',                                                           | |
| |                     'NbYOutliers',                                                           | |
| |                     'eye1XVar',                                                              | |
| |                     'eye1YVar'                                                               | |
| |                 ]                                                                            | |
| |          self =    SamplingFrequency                                            Sources      | |
| |                 filename    subject                                                          | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-01/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-01_task-bodymapST1_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-02/func/trash/sub-SID001684...      | |
| |                 sub-SID001684_ses-02_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-02/func/trash/sub-SID001684...      | |
| |                 sub-SID001684_ses-02_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-02/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-02_task-pinellocalizer_acq-m...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-02/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-02_task-pinellocalizer_acq-m...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| |                 0           2.173913  [sub-SID001684/ses-03/func/sub-SID001684_ses-0...      | |
| |                 sub-SID001684_ses-03_task-bodymapST2_acq-mb8_r...  SID001684                 | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/panda |
| s/core/indexes/base.py:5877 in _get_indexer_strict                                               |
|                                                                                                  |
|   5874         else:                                                                             |
|   5875             keyarr, indexer, new_indexer = self._reindex_non_unique(keyarr)               |
|   5876                                                                                           |
| \u2771 5877         self._raise_if_missing(keyarr, indexer, axis_name)                                |
|   5878                                                                                           |
|   5879         keyarr = self.take(indexer)                                                       |
|   5880         if isinstance(key, Index):                                                        |
|                                                                                                  |
| +------------------------------------------ locals ------------------------------------------+   |
| | axis_name = 'columns'                                                                      |   |
| |   indexer = array([ 3,  2, -1, -1, -1, -1, -1])                                            |   |
| |       key = [                                                                              |   |
| |                 'subject',                                                                 |   |
| |                 'filename',                                                                |   |
| |                 'NbDisplacementOutliers',                                                  |   |
| |                 'NbXOutliers',                                                             |   |
| |                 'NbYOutliers',                                                             |   |
| |                 'eye1XVar',                                                                |   |
| |                 'eye1YVar'                                                                 |   |
| |             ]                                                                              |   |
| |    keyarr = Index(['subject', 'filename', 'NbDisplacementOutliers', 'NbXOutliers',         |   |
| |                    'NbYOutliers', 'eye1XVar', 'eye1YVar'],                                 |   |
| |                   dtype='object')                                                          |   |
| |      self = Index(['SamplingFrequency', 'Sources', 'filename', 'subject'], dtype='object') |   |
| +--------------------------------------------------------------------------------------------+   |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages/panda |
| s/core/indexes/base.py:5941 in _raise_if_missing                                                 |
|                                                                                                  |
|   5938                 raise KeyError(f"None of [{key}] are in the [{axis_name}]")               |
|   5939                                                                                           |
|   5940             not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique())       |
| \u2771 5941             raise KeyError(f"{not_found} not in index")                                   |
|   5942                                                                                           |
|   5943     @overload                                                                             |
|   5944     def _get_indexer_non_comparable(                                                      |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| |        axis_name = 'columns'                                                                 | |
| |          indexer = array([ 3,  2, -1, -1, -1, -1, -1])                                       | |
| |              key = Index(['subject', 'filename', 'NbDisplacementOutliers', 'NbXOutliers',    | |
| |                           'NbYOutliers', 'eye1XVar', 'eye1YVar'],                            | |
| |                          dtype='object')                                                     | |
| |     missing_mask = array([False, False,  True,  True,  True,  True,  True])                  | |
| |         nmissing = 5                                                                         | |
| |        not_found = [                                                                         | |
| |                        'NbDisplacementOutliers',                                             | |
| |                        'NbXOutliers',                                                        | |
| |                        'NbYOutliers',                                                        | |
| |                        'eye1XVar',                                                           | |
| |                        'eye1YVar'                                                            | |
| |                    ]                                                                         | |
| |             self = Index(['SamplingFrequency', 'Sources', 'filename', 'subject'],            | |
| |                    dtype='object')                                                           | |
| | use_interval_msg = False                                                                     | |
| +----------------------------------------------------------------------------------------------+ |
+--------------------------------------------------------------------------------------------------+
KeyError: "['NbDisplacementOutliers', 'NbXOutliers', 'NbYOutliers', 'eye1XVar', 'eye1YVar'] not in index"
slurmstepd: error: Detected 1 oom_kill event in StepId=7733470.batch. Some of the step tasks have been OOM Killed.

Environment

- OS: CentOS Linux release 7.9.2009 (Core)

Branch

No response

Anything else?

No response

@Remi-Gau Remi-Gau changed the title [BUG] KeyError: "['NbDisplacementOutliers', 'NbXOutliers', 'NbYOutliers', 'eye1XVar', 'eye1YVar'] not in index" [BUG] KeyError: ['NbDisplacementOutliers', 'NbXOutliers', 'NbYOutliers', 'eye1XVar', 'eye1YVar'] not in index Sep 19, 2023
@Remi-Gau Remi-Gau added this to the 0.4.0 milestone Aug 1, 2024
@Remi-Gau Remi-Gau added the bug Something isn't working label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants