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

getting file from right-click context menu violates constraints #406

Open
adswa opened this issue Oct 27, 2022 · 3 comments · May be fixed by #401
Open

getting file from right-click context menu violates constraints #406

adswa opened this issue Oct 27, 2022 · 3 comments · May be fixed by #401

Comments

@adswa
Copy link
Member

adswa commented Oct 27, 2022

Calling get for a single file from a right-click context menu violates a constraint and prevents successful command parametrization/execution:
Screencast from 2022-10-27 14-13-46.webm

The error is:

Traceback (most recent call last):
  File "/home/adina/repos/datalad-gooey/datalad_gooey/dataladcmd_ui.py", line 105, in configure
    self._parameters = populate_form_w_params(
  File "/home/adina/repos/datalad-gooey/datalad_gooey/param_form_utils.py", line 139, in populate_form_w_params
    p[1].set_from_spec(cmdkwargs_defaults)
  File "/home/adina/repos/datalad-gooey/datalad_gooey/param.py", line 191, in set_from_spec
    self.set(spec[self.__name])
  File "/home/adina/repos/datalad-gooey/datalad_gooey/param.py", line 163, in set
    val = self.get_constraint()(value) if value != _NoValue else value
  File "/home/adina/repos/datalad/datalad/support/constraints.py", line 437, in __call__
    raise ValueError("all alternative constraints (%s) violated while testing value %r"
ValueError: all alternative constraints ([constraint:<class 'list'>(constraint:path), constraint:None]) violated while testing value PosixPath('/home/adina/ml-books/T.Hastie_R.Tibshirani_J.Friedman-The_Elements_of_Statistical_Learning_Data_Mining_Inference_and_Prediction.pdf')

This does not happen when parametrizing Get from the right-click context menu of the top level dataset.

@adswa
Copy link
Member Author

adswa commented Oct 28, 2022

I assume that @mih's work on #401 can more easily fix this/take this issue into account than an isolated effort on the current constraint system.

@mih
Copy link
Member

mih commented Oct 28, 2022

Yes, the open PR does that already, I believe

@adswa
Copy link
Member Author

adswa commented Apr 20, 2023

I can confirm that issue disappears with #401

@adswa adswa linked a pull request Apr 20, 2023 that will close this issue
@mslw mslw linked a pull request Jun 14, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants