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

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

Closed
Michael-Sun opened this issue Sep 16, 2023 · 5 comments
Closed

Comments

@Michael-Sun
Copy link

Michael-Sun commented Sep 16, 2023

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
Copy link

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
Copy link
Contributor

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
Copy link
Author

Michael-Sun commented Sep 18, 2023 via email

@Remi-Gau
Copy link
Contributor

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
Copy link
Author

Thanks @Remi-Gau this worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants