Replies: 1 comment
-
There is no requirement that the function that you pass to get_cmd is a lamda so I would suggest making in a regular private method if you find the lambda too limiting. But I actually think the problem is elsewhere. It looks like you have created a parameter called channel more than once on the same instrument. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, all.
I'm using QCodes to talk to an API that uses HTTP GET and HTTP POST to get and retrieve data, respectively. My code inherits from a QCodes instrument class. All of this is in Python.
The method get_device_info(device_name, device_id, active) requires three parameters in order to return data related to it. Assume it lives elsewhere in this same python class. The python class inherits from QCodes.Instrument, so add_parameter() is available. I connect my method to the device by initializing the following code in the constructor, like this:
...but I keep getting an error message:
There are no duplicate keys anywhere that I can see.
Again, all three parameters are required, and I'm using them to read information about a device. Error messages like this tell me that something went wrong behind the scenes. QCodes was expecting things in a certain format, and it didn't receive them in the way it was expecting.
How can I use a Lambda expression to account for parameters that must be passed in, so I can retrieve data? Should I use something else?
Please let me know.
Beta Was this translation helpful? Give feedback.
All reactions