neurocurator icon indicating copy to clipboard operation
neurocurator copied to clipboard

[Annotations] Completeness of numerical traces not validated before parameter saving

Open srjimenez opened this issue 7 years ago • 4 comments

Steps:

  1. Choose a PDF
  2. Tag with the appropriate species/strain (tagging)
  3. In annotation details add "new" "table" and give the details of table No. row No. and Column No. plus the title of the table in the comments
  4. In "Parameters" open a "New" parameter and in the "parameter details" choose a result type "numerical trace" and add the necessary dependent variables and samples to your table
  5. Start filling the table with the values indicated ("type" "Unit" "statistic" and values)
  6. Push the "Save" button on the "existing parameters"
  7. Issue: It is not possible to save table, it does not accept float values

Stack trace:

TypeError: float() argument must be a string or a number, not 'NoneType'
Traceback (most recent call last):
  File "neurocurator/modParamWidgets.py", line 327, in saveParameter
  File "neurocurator/paramTraceWgt.py", line 105, in saveParameter
  File "neurocurator/variableTableWgt.py", line 202, in getDepVar
TypeError: float() argument must be a string or a number, not 'NoneType'

srjimenez avatar Jan 05 '18 14:01 srjimenez

It needs to have an "Independent variable" in the table to be able to save, it will otherwise not save the added values in the other dependent variables.

srjimenez avatar Jan 08 '18 14:01 srjimenez

What was the issue? a - The need for an independent variable isn't enforced before saving? b - Adding an independent variable isn't the expected behaviour (ie. workaround)?

Shouldn't we reopen this issue as there is still an issue (ie. printed TypeError)?

NB: As already said, please do not do administrative tasks like closing issues because it is extra work to keep track of what is going on...

pafonta avatar Jan 15 '18 09:01 pafonta

For the record, there can obviously be more error control so that the behavior is more graceful, but that being said, the error was more a conceptual error at the usage level. The purpose of a "numerical trace" is to link a dependent variable with an independent one. If there is no dependent variable, the correct type (the type to use) is "point value". This is shown to the user by the fact that at the creation of a "numerical trace", two columns for "independent variables" and "dependent variables" are created and required to be filled in. So, I think the problem is more in the way that this usage error reported to the user (i.e., a cryptic exception is triggered in command line instead of a useful dialog box error message).

christian-oreilly avatar Jan 15 '18 10:01 christian-oreilly

Re-opened to implement / fix this:

I think the problem is more in the way that this usage error reported to the user (i.e., a cryptic exception is triggered in command line instead of a useful dialog box error message).

=> The completeness of numerical traces must be validated when saving parameters.

Renamed to correspond to the real issue behind the scene.

pafonta avatar Jan 15 '18 12:01 pafonta