Open JonasHoelscher opened 5 months ago
Your intended schema has two issues that lead to this error: 1) Depending on a list of arrays is ambiguous: Which element of the list will depend on which element of the other list? 2) Dependencies can only be one-way from dependent to independent variable.
I agree that we could provide a more helpful error message here, but the limitations are intended.
If the dsch schema looks like this
When running the save() function an exception is thrown: AttributeError: 'List' object has no attribute 'channel_2'
This error does not occur when the validation is skipped: By using save(force=True).
Possible cause: The problem is that the validation does only look at the parent node and when the Array inside of the List has a depends_on property it will check the parent node, in this case the list, if it has an item called "channel_2".
This can be seen in dsch/data.py:
Where when the items are added to the independent_values list only the direct parent is taken.