Nov-29-2021, 06:34 PM
I would start by understanding what is going on when the Value Error exception is raised. What is returned by receive()? Maybe start with something like this:
def get_dcv(self): self.connector.send('DCV?') try: value = self.connector.receive() return float(value) except ValueError: print(f"Expecting a float but got '{value}'") return 0Now you can see what you get when this error occurs. Do the non-float return values contain important information?