-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_parser not used in combination with val_mapping #524
Comments
@damazter quick comment of which I am not sure about: isn't the val mapping supposed to be the other way around ? {'0':False,'1':True } |
@giulioungaretti I think it's right how it is now. @damazter For some reason it acts as if the |
@Rubenknex |
@alexcjohnson can explain you 🦄 |
@giulioungaretti """
val_mapping (Optional[dict]): a bidirectional map data/readable values
to instrument codes, expressed as a dict:
``{data_val: instrument_code}``
For example, if the instrument uses '0' to mean 1V and '1' to mean
10V, set val_mapping={1: '0', 10: '1'} and on the user side you
only see 1 and 10, never the coded '0' and '1'
""" |
also from the docs:
So yeah, it should work. Seems like for whatever reason the value it's getting is something that will cast to
To make it easier to debug in the future, we should keep track of the original value passed into Anyway |
@alexcjohnson thanks! |
@giulioungaretti Comparing integers fixes all my problems, I made a pr to the relevant driver. For me this closes the issue, but if you want to solve the underlying problem as well 'giulio' you can keep this open, otherwise, just close it |
Ah I see, your AMI430 driver is an |
@damazter I think I will close this. The get_parser is indeed working as expected! For posterity sake: "0\n" which is not equal to but casting to int: int("0\n") which is equal to |
If you encounter a bug use the following template.
If you have a feature request feel free to freestyle.
Steps to reproduce
instrument.is_quenched()
Expected behaviour
no error
Actual behaviour
I get the error (see below):
from which it is apparent it uses
_valmapping_get_parser
for which the docstring says:So it seems to me that it ignores my get_parser
error traceback:
System
operating system
win7
qcodes branch
local, related to driver/AMI_430
qcodes commit
latest merge with master
de88c36
The text was updated successfully, but these errors were encountered: