cpp-lln-lab / bidsMReye

BIDS app using deepMReye to decode eye motion for fMRI time series data.
https://bidsmreye.readthedocs.io/en/latest/
Other
5 stars 5 forks source link

TypeError: fetch() got an unexpected keyword argument 'progressbar' #164

Closed Michael-Sun closed 9 months ago

Michael-Sun commented 9 months ago

I installed bidsmreye with PyPi and attempted to run bidsmreye at the root of my BIDS directory and it failed. Here is my result:

(base) [f003z4j@g01 1080_wasabi]$ bidsmreye --action all . /dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye/bidsmreye participant

2023-09-16 17:52:59.485969: 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.
2023-09-16 17:53:09.978148: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
WARNING
[17:55:58] WARNING  bidsMReye - [17:55:58] - log level: WARNING                                                  bidsmreye.py:115+------------------------------- Traceback (most recent call last) --------------------------------+
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/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 0x2b5e7ed7cc10>                                                  |      |
| |  re = <module 're' from '/dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/re.py'> |      |
| | sys = <module 'sys' (built-in)>                                                         |      |
| +-----------------------------------------------------------------------------------------+      |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/site-packages/bidsmreye/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 -------------------------------------------+ |
| |           args = Namespace(bids_dir='.',                                                     | |
| |                  output_dir='/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/de\u2026 | |
| |                  analysis_level='participant', action='all', participant_label=None,         | |
| |                  task=None, run=None, space=None, log_level=None, debug=False,               | |
| |                  reset_database=False, bids_filter_file=None, non_linear_coreg=False,        | |
| |                  model='1to6')                                                               | |
| |           argv = [                                                                           | |
| |                      '/dartfs-hpc/rc/home/j/f003z4j/miniconda3/bin/bidsmreye',               | |
| |                      '--action',                                                             | |
| |                      'all',                                                                  | |
| |                      '.',                                                                    | |
| |                      '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye\u2026 | |
| |                      'participant'                                                           | |
| |                  ]                                                                           | |
| |      log_level = 2                                                                           | |
| | log_level_name = 'WARNING'                                                                   | |
| |         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/lib/python3.9/site-packages/bidsmreye/bidsmreye.py:127  |
| in bidsmreye                                                                                     |
|                                                                                                  |
|   124     log.debug(f"Configuration:\n{cfg}")                                                    |
|   125                                                                                            |
|   126     if action in {"all", "generalize"} and isinstance(cfg.model_weights_file, str):        |
| \u2771 127         cfg.model_weights_file = download(cfg.model_weights_file)                          |
|   128                                                                                            |
|   129     dispatch(analysis_level=analysis_level, action=action, cfg=cfg)                        |
|   130                                                                                            |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| |             action = 'all'                                                                   | |
| |     analysis_level = 'participant'                                                           | |
| |           bids_dir = '.'                                                                     | |
| |        bids_filter = None                                                                    | |
| |   bids_filter_file = None                                                                    | |
| |                cfg = Config(                                                                 | |
| |                          input_dir=PosixPath('.'),                                           | |
| |                          output_dir=PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WAS\u2026 | |
| |                          subjects=[                                                          | |
| |                              'SID000002',                                                    | |
| |                              'SID000743',                                                    | |
| |                              'SID001567',                                                    | |
| |                              'SID001641',                                                    | |
| |                              'SID001651',                                                    | |
| |                              'SID001684',                                                    | |
| |                              'SID001804',                                                    | |
| |                              'SID001852',                                                    | |
| |                              'SID001907',                                                    | |
| |                              'SID002035',                                                    | |
| |                              ... +2                                                          | |
| |                          ],                                                                  | |
| |                          space=[],                                                           | |
| |                          task=[                                                              | |
| |                              'movemap',                                                      | |
| |                              'pinellocalizer',                                               | |
| |                              'bodymapST2',                                                   | |
| |                              'hyperalignment',                                               | |
| |                              'bodymapST1',                                                   | |
| |                              'distractmap',                                                  | |
| |                              'acceptmapXexperience',                                         | |
| |                              'acceptmapXregulate',                                           | |
| |                              'acceptmap1Xexperience',                                        | |
| |                              'acceptmap1Xpostexp',                                           | |
| |                              ... +5                                                          | |
| |                          ],                                                                  | |
| |                          run=[1, 2, 3, 4, 5, 6, 7, 9, 10, 11, ... +2],                       | |
| |                          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'}   | |
| |                          },                                                                  | |
| |                          debug=False,                                                        | |
| |                          reset_database=False,                                               | |
| |                          non_linear_coreg=False                                              | |
| |                      )                                                                       | |
| |              debug = False                                                                   | |
| |     log_level_name = 'WARNING'                                                               | |
| | model_weights_file = '1to6'                                                                  | |
| |   non_linear_coreg = False                                                                   | |
| |         output_dir = '/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/derivatives/deepmreye\u2026 | |
| |  participant_label = None                                                                    | |
| |     reset_database = False                                                                   | |
| |                run = None                                                                    | |
| |              space = None                                                                    | |
| |               task = None                                                                    | |
| +----------------------------------------------------------------------------------------------+ |
|                                                                                                  |
| /dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/site-packages/bidsmreye/download.py:111   |
| in download                                                                                      |
|                                                                                                  |
|   108                                                                                            |
|   109         file_idx = available_models().index(model_name)                                    |
|   110         filename = f"dataset_{available_models()[file_idx]}.h5"                            |
| \u2771 111         output_file = POOCH.fetch(filename, progressbar=True)                              |
|   112         if isinstance(output_file, str):                                                   |
|   113             output_file = Path(output_file)                                                |
|   114                                                                                            |
|                                                                                                  |
| +------------------------------------------- locals -------------------------------------------+ |
| |      file_idx = 7                                                                            | |
| |      filename = 'dataset_1to6.h5'                                                            | |
| |    model_name = '1to6'                                                                       | |
| |    output_dir = PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/1080_wasabi/mode\u2026 | |
| |   output_file = PosixPath('/dartfs-hpc/rc/lab/C/CANlab/labdata/data/WASABI/1080_wasabi/mode\u2026 | |
| |         POOCH = <pooch.core.Pooch object at 0x2b5e7ed72ac0>                                  | |
| | registry_file = <_io.BufferedReader                                                          | |
| |                 name='/dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/site-packages/\u2026 | |
| +----------------------------------------------------------------------------------------------+ |
+--------------------------------------------------------------------------------------------------+
TypeError: fetch() got an unexpected keyword argument 'progressbar'
github-actions[bot] commented 9 months ago

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

Remi-Gau commented 9 months ago

hey @Michael-Sun

thanks for the bug report

can you check which version of pooch got installed?

it seems that the progressbar is a valid argument in the latest version of pooch:

https://www.fatiando.org/pooch/latest/api/generated/pooch.Pooch.html?highlight=fetch#pooch.Pooch.fetch

Michael-Sun commented 9 months ago

Thanks for the reply Remi, it appears that I am using 1.4.0. I will try updating it and see

(base) @. ~]$ pip show pooch Name: pooch Version: 1.4.0 Summary: Pooch manages your Python library's sample data files: it automatically downloads and stores them in a local directory, with support for versioning and corruption checks. Home-page: https://github.com/fatiando/pooch Author: Leonardo Uieda Author-email: @. License: BSD License Location: /dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/site-packages Requires: appdirs, packaging, requests Required-by: bidsmreye

Remi-Gau commented 9 months ago

looks like it was added in version 1.6

data_install

I need to update the dependency list to make sure this is mentioned

sorry about that

Michael-Sun commented 9 months ago

Thanks @Remi-Gau this worked!