We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pcdsdevices/pcdsdevices/epics_motor.py
Line 178 in e1be5bf
Also in this case the state repr fails:
In [2]: lib_y.presets.state() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [2], in <cell line: 1>() ----> 1 lib_y.presets.state() File /cds/group/pcds/pyps/apps/hutch-python/xcs/dev/devpath/pcdsdevices/interface.py:1301, in Presets.state(self) 1299 state_name = method_name.replace('wm_', '', 1) 1300 wm_state = getattr(device, method_name) -> 1301 diff = abs(wm_state()) 1302 if diff < closest: 1303 state = state_name File /cds/group/pcds/pyps/apps/hutch-python/xcs/dev/devpath/pcdsdevices/interface.py:1263, in Presets._make_wm_pre.<locals>.wm_pre(self) 1251 """ 1252 Check the offset from the {} preset position. 1253 (...) 1259 is in the positive direction from us. 1260 """ 1262 pos = self.presets._cache[preset_type][name]['value'] -> 1263 return pos - self.wm() TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
Error presets don't crash everything
From debugging some issues in XCS
slack thread
motor.presets.state()
Fix it?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current Behavior
pcdsdevices/pcdsdevices/epics_motor.py
Line 178 in e1be5bf
this should refer to the "ERROR" preset and display the status instead of exploding
Also in this case the state repr fails:
Expected Behavior
Error presets don't crash everything
Context / environment
From debugging some issues in XCS
Steps to Reproduce (for bugs)
slack thread
motor.presets.state()
Suggested Solution
Fix it?
The text was updated successfully, but these errors were encountered: