Ulm-IQO / qudi-core

A framework for modular measurement applications.
GNU General Public License v3.0
28 stars 21 forks source link

StatusVariables prevent start of modules with different Qudi configuration [Bug] #59

Closed NicolasStaudenmaier closed 10 months ago

NicolasStaudenmaier commented 1 year ago

Version

Development

What is affected by the bug?

Loading of a module does not work if features of the saved StatusVariables are not available with a different configuration of Qudi, though they may not be necessary for a working version of the module.

When does the bug occur?

The bug occurred to me when starting pulsedmeasurement of the IQO-modules. In a previous Qudi session I have used custom fit methods in pulsed measurements. Those fit methods were saved in the StatusVariables of the module. Switching to a different branch and starting pulsed measurements throws an error because the fit methods cannot be found. Starting of the module is impossible until the StatusVariable is deleted.

How do we replicate the issue?

Expected behavior

The module should load nonetheless, ignoring that minor saved features are not available. A warning message could be logged in that case.

Relevant log output

No response

Additional Comments

No response

Contact Details

No response

LukePiewalker commented 1 year ago

I think I recall a discussion once about handling the Status Variables and sanitizing their status upon load. I think during this discussion the final state was that this should be handled on the module level itself.

However, defaulting Status Variables upon load if loading results in an error, might be something which could be done on the qudi-core level though, if there is no reason against it? If it is possible at all,?

Neverhorst commented 1 year ago

I agree that qudi modules should fall back to default value if loading of a StatusVar fails. This must be done in qudi-core.

Neverhorst commented 11 months ago

Hey @NicolasStaudenmaier @LukePiewalker , turns out the issue had nothing to do with StatusVar. Loading the fit configuration StatusVar into the fit model/container caused the error. This step is performed by the logic module owning the fit model. Please have a look at PR #79 which should fix this issue by only logging a warning if the fit configuration can not be loaded and continue.