brainvisa / axon

Brainvisa main GUI
Other
0 stars 1 forks source link

Exception: <undefined> is not a valid value for data type Unicode #64

Closed ylep closed 1 year ago

ylep commented 1 year ago

Describe the bug

These messages seem to appear the first time a Capsul-based process is opened in Axon:

Exception: <undefined> is not a valid value for data type Unicode
Exception: <undefined> is not a valid value for data type Unicode
Exception: <undefined> is not a valid value for data type Unicode
Exception: <undefined> is not a valid value for data type Unicode

To Reproduce Steps to reproduce the behavior:

  1. Open a fresh instance of brainvisa
  2. Open the Morphologist 2021 pipeline, or a process of the (new) highres-cortex toolbox

Environment:

Additional context These messages seem harmless, but they pollute the log and may scare users into thinking something is wrong.

denisri commented 1 year ago

We know about it but it is likely very difficult to solve. I have not looked right now and I answer using arguments I have in memory, which may not all be right. The exception is produced by traits. Before values in a process/pipeline are initialized (valid values are set by the user or the completion system), all values are Undefined by default. Traits allows this even if Undefined is not a valid value for the trait. But in pipelines, values are propagated through links, thus such Undefined values are set by the link system before valid values replace them later. We could define all traits using "some type or Undefined" but then we will lose all validation at the moment the pipeline is setup and about to run. The problem is that Undefined should be allowed in the "initialization" phase (while we setup the pipeline and don't run it yet), but should be forbidden once we are about to run it. In capsul v3 I think @sapetnioc has implemented this "some type or undefined" behaviour, otherwise it was almost impossible to makle it work. Anyway the exception here is catched (as you point, it's harmless) so we could just remove the message (I don't know exactly where it is printed) but then some actual errors will go unnotified later. Maybe it's the best way for now, because I agree that it is frightening, and it happens so often that we cannot see real errors anyway.

denisri commented 1 year ago

Actually this exception print is in axon/capsul matlab config sync and can easily be removed. I'm doing that.