datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
5 stars 6 forks source link

Unable to perform file get/drop due to constraints error #411

Open mslw opened 2 years ago

mslw commented 2 years ago

In a cloned dataset without annexed file content (e.g. https://gin.g-node.org/msz/new-rdm-workshop)

Right click on a file -> file commands -> get content produces an inactive Command tab in the GUI, and the following traceback:

Traceback (most recent call last):
  File "/home/mszczepanik/Documents/datalad-gooey/datalad_gooey/dataladcmd_ui.py", line 105, in configure
    self._parameters = populate_form_w_params(
  File "/home/mszczepanik/Documents/datalad-gooey/datalad_gooey/param_form_utils.py", line 139, in populate_form_w_params
    p[1].set_from_spec(cmdkwargs_defaults)
  File "/home/mszczepanik/Documents/datalad-gooey/datalad_gooey/param.py", line 191, in set_from_spec
    self.set(spec[self.__name])
  File "/home/mszczepanik/Documents/datalad-gooey/datalad_gooey/param.py", line 163, in set
    val = self.get_constraint()(value) if value != _NoValue else value
  File "/home/mszczepanik/.virtualenvs/dl-gooey-dev/lib/python3.9/site-packages/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/mszczepanik/Documents/test-2022-11-08/new-rdm-workshop/inputs/images/chinstrap_01.jpg')

Apparently path != list of paths. Unfortunately I wasn't able to quickly find the right place for a quick fix.

adswa commented 2 years ago

I believe this is the same as #406?

mslw commented 2 years ago

Ah, you're right.

mslw commented 2 years ago

Duplicate of #406