Closed vishnuinsytesys closed 5 years ago
Fixed and updated on pypi. Let me know if this works.
Awesome! Thanks Patrick!
Regards,
Vishnu
From: Patrick Fuller notifications@github.com Sent: Thursday, February 14, 2019 7:41 AM To: numat/alicat alicat@noreply.github.com Cc: vishnuinsytesys vishnu@insytesys.com; Author < author@noreply.github.com> Subject: Re: [numat/alicat] 'MOV', 'VOV' extra cases (#12)
Fixed and updated on pypi. Let me know if this works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/numat/alicat/issues/12#issuecomment-463674412, or mute the thread https://github.com/notifications/unsubscribe-auth/Aen68adR-Hnp9R_nqiyjS73LcxyzQTFYks5vNYNzgaJpZM4a6qRY .
in the get method "def get(self, retries=2):", you have a check for MOV and VOV conditions. I have an alicat where the VOV was in capital case from the alicat instrument, and therefore caused issues in the check farther down, causing the float(v) operation to be done on a string: return {k: (v if k == self.keys[-1] else float(v)) for k, v in zip(self.keys, values)}
The fix is to check for capital case as well: while values[-1] in ['MOV', 'VOV', 'Mov', 'Vov']: del values[-1]