[BUG]: Datalad fails to clean #186

Closed
opened 2023-03-14 21:00:54 +00:00 by fraimondo · 2 comments
fraimondo commented 2023-03-14 21:00:54 +00:00 (Migrated from github.com)

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When there is an error in the pipeline, datalad fails to clean:

TypeError: __call__() got an unexpected keyword argument 'reckless'

Expected Behavior

It should just clean up

Steps To Reproduce

  1. Install junifer
  2. Run something that will raise an error (for example, use_afni=True in juseless without sourcing afni)
  3. see the error appear.

Environment

junifer:
  version: 0.0.1.dev927
python:
  version: 3.9.12
  implementation: CPython
dependencies:
  click: 8.1.3
  numpy: 1.21.2
  datalad: 0.15.5
  pandas: 1.4.1
  nibabel: 3.2.2
  nilearn: 0.9.0
  sqlalchemy: 1.4.32
  yaml: '6.0'
system:
  platform: Linux-4.19.0-21-amd64-x86_64-with-glibc2.28
environment:
  LC_CTYPE: en_US.UTF-8
  PATH: /usr/lib/fsl/5.0:/home/fraimondo/anaconda3/envs/junifer/bin:/home/fraimondo/anaconda3/condabin:/home/fraimondo/.dotfiles/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local/games:/usr/games

Relevant log output

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fraimondo/anaconda3/envs/junifer/bin/junifer", line 8, in <module>
    sys.exit(cli())
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/fraimondo/dev/tbox/junifer/junifer/api/cli.py", line 119, in run
    api_run(
  File "/home/fraimondo/dev/tbox/junifer/junifer/api/functions.py", line 171, in run
    mc.fit(datagrabber_object[t_element])
  File "/home/fraimondo/dev/tbox/junifer/junifer/datagrabber/multiple.py", line 107, in __exit__
    dg.__exit__(exc_type, exc_value, exc_traceback)
  File "/home/fraimondo/dev/tbox/junifer/junifer/datagrabber/datalad_base.py", line 245, in __exit__
    self.cleanup()
  File "/home/fraimondo/dev/tbox/junifer/junifer/datagrabber/datalad_base.py", line 203, in cleanup
    self._dataset.remove(reckless="kill", result_renderer="disabled")
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/distribution/dataset.py", line 484, in apply_func
    return f(**kwargs)
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/interface/utils.py", line 484, in eval_func
    return return_func(generator_func)(*args, **kwargs)
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/interface/utils.py", line 476, in return_func
    results = list(results)
  File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/interface/utils.py", line 398, in generator_func
    wrapped(*_args, **_kwargs),
TypeError: __call__() got an unexpected keyword argument 'reckless'
Cleaning up temporary directory...

Anything else?

No response

### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior When there is an error in the pipeline, datalad fails to clean: ``` TypeError: __call__() got an unexpected keyword argument 'reckless' ``` ### Expected Behavior It should just clean up ### Steps To Reproduce 1. Install junifer 2. Run something that will raise an error (for example, use_afni=True in juseless without sourcing afni) 3. see the error appear. ### Environment ```markdown junifer: version: 0.0.1.dev927 python: version: 3.9.12 implementation: CPython dependencies: click: 8.1.3 numpy: 1.21.2 datalad: 0.15.5 pandas: 1.4.1 nibabel: 3.2.2 nilearn: 0.9.0 sqlalchemy: 1.4.32 yaml: '6.0' system: platform: Linux-4.19.0-21-amd64-x86_64-with-glibc2.28 environment: LC_CTYPE: en_US.UTF-8 PATH: /usr/lib/fsl/5.0:/home/fraimondo/anaconda3/envs/junifer/bin:/home/fraimondo/anaconda3/condabin:/home/fraimondo/.dotfiles/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local/games:/usr/games ``` ### Relevant log output ```shell During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/fraimondo/anaconda3/envs/junifer/bin/junifer", line 8, in <module> sys.exit(cli()) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/home/fraimondo/dev/tbox/junifer/junifer/api/cli.py", line 119, in run api_run( File "/home/fraimondo/dev/tbox/junifer/junifer/api/functions.py", line 171, in run mc.fit(datagrabber_object[t_element]) File "/home/fraimondo/dev/tbox/junifer/junifer/datagrabber/multiple.py", line 107, in __exit__ dg.__exit__(exc_type, exc_value, exc_traceback) File "/home/fraimondo/dev/tbox/junifer/junifer/datagrabber/datalad_base.py", line 245, in __exit__ self.cleanup() File "/home/fraimondo/dev/tbox/junifer/junifer/datagrabber/datalad_base.py", line 203, in cleanup self._dataset.remove(reckless="kill", result_renderer="disabled") File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/distribution/dataset.py", line 484, in apply_func return f(**kwargs) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/interface/utils.py", line 484, in eval_func return return_func(generator_func)(*args, **kwargs) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/interface/utils.py", line 476, in return_func results = list(results) File "/home/fraimondo/anaconda3/envs/junifer/lib/python3.9/site-packages/datalad/interface/utils.py", line 398, in generator_func wrapped(*_args, **_kwargs), TypeError: __call__() got an unexpected keyword argument 'reckless' Cleaning up temporary directory... ``` ### Anything else? _No response_
fraimondo commented 2023-03-15 09:59:02 +00:00 (Migrated from github.com)

@bpoldrack: do you have any insight on this? It seems to be a datalad issue in the background.

@bpoldrack: do you have any insight on this? It seems to be a datalad issue in the background.
fraimondo commented 2023-03-16 14:12:55 +00:00 (Migrated from github.com)

my bad, datalad version 0.15 does not have reckless parameter.

my bad, datalad version 0.15 does not have `reckless` parameter.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer#186
No description provided.