ALBA-Synchrotron / sardana-icepap

IcePAP plugins for Sardana
GNU General Public License v3.0
0 stars 2 forks source link

Add protection to macro ipap_motor_pars #32

Open rhomspuron opened 1 month ago

rhomspuron commented 1 month ago
Door_BL09 [3]: %ipap_motor_pars /beamlines/bl09/controls/backup/20240725_icepap_backups.txt
An error occurred while running ipap_motor_pars:
API_CorbaException: TRANSIENT CORBA system exception: TRANSIENT_CallTimedout
Hint: in Spock execute `www` to get more details

Door_BL09 [4]: www
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sardana/macroserver/msmacromanager.py", line 1691, in runMacro
    for step in macro_obj.exec_():
  File "/usr/lib/python3/dist-packages/sardana/macroserver/macro.py", line 2407, in exec_
    res = self.run(*self._in_pars)
  File "/usr/lib/python3/dist-packages/sardana/macroserver/macro.py", line 2583, in run
    return self._function(self, *args)
  File "/beamlines/bl09/controls/user_macros/ipap.py", line 339, in ipap_motor_pars
    table = motorTable(icepapMotors, pars, fmts)
  File "/beamlines/bl09/controls/user_macros/ipap.py", line 79, in motorTable
    for motor in motors]
  File "/beamlines/bl09/controls/user_macros/ipap.py", line 79, in <listcomp>
    for motor in motors]
  File "/beamlines/bl09/controls/user_macros/ipap.py", line 71, in getHumanMotorPars
    values = getMotorPars(motor, pars)
  File "/beamlines/bl09/controls/user_macros/ipap.py", line 62, in getMotorPars
    return motor.read_attributes(pars)
  File "/usr/lib/python3/dist-packages/tango/green.py", line 195, in greener
    return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
  File "/usr/lib/python3/dist-packages/tango/green.py", line 109, in run
    return fn(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/tango/device_proxy.py", line 1534, in __DeviceProxy__read_attributes
    return self._read_attributes(*args, **kwargs)
PyTango.CommunicationFailed: DevFailed[
DevError[
    desc = TRANSIENT CORBA system exception: TRANSIENT_CallTimedout
  origin = DeviceProxy:read_attributes
  reason = API_CorbaException
severity = ERR]

DevError[
    desc = Timeout (3000 mS) exceeded on device motor/fe_icepap_ctrl/1
  origin = DeviceProxy:read_attributes
  reason = API_DeviceTimedOut
severity = ERR]
]

If the controller is offline there are problems with the macro, similar problem with the sardana macro "wa"