You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you create a DelegateParameter and pass a scale argument, it is not possible to get its cache before it is initialized. The scale gets applied to the None that resides in the source parameter and gives a TypeError.
It appears that _from_raw_value_to_raw_value applies the scale on the value even if it's None. A simple solution would be to put a big if value is not None: in the method, but this may not cover all the use cases (e.g. more intricate ways of handling the scale than dividing/multiplying).
System
Windows 10
qcodes 0.30.1
The text was updated successfully, but these errors were encountered:
@astafan8 That sounds like a good plan! Allowing None for the parser and in the inverse_val_mapping dictionary makes sense. I'll start a PR with tests.
If you create a DelegateParameter and pass a scale argument, it is not possible to get its cache before it is initialized. The scale gets applied to the None that resides in the source parameter and gives a TypeError.
Steps to reproduce
Expected behaviour
I expected to get None back, just as you would a plain uninitialized Parameter.
A workaround is to give nan as an initial cache value. This works:
Actual behaviour
I got a TypeError:
It appears that
_from_raw_value_to_raw_value
applies the scale on the value even if it's None. A simple solution would be to put a bigif value is not None:
in the method, but this may not cover all the use cases (e.g. more intricate ways of handling the scale than dividing/multiplying).System
Windows 10
qcodes 0.30.1
The text was updated successfully, but these errors were encountered: