Regression: Unexpected exception raised by read_attributes_reply since v10.0.0

While testing the new taurus release I found an issue running taurus device sys/tg_test/1.

Looking more into it, the problem comes from read_attributes_reply. It can be reproduced with:

import tango
 
dp = tango.DeviceProxy("sys/tg_test/1")
req_id = dp.read_attributes_asynch(["ampli", "no_value", "boolean_scalar"])
result = dp.read_attributes_reply(req_id, 0)

This worked fine with pytango 9.5:

[DeviceAttribute(data_format = tango._tango.AttrDataFormat.SCALAR, dim_x = 1, dim_y = 0, has_failed = False, is_empty = False, name = 'ampli', nb_read = 1, nb_written = 1, quality = tango._tango.AttrQuality.ATTR_VALID, r_dimension = AttributeDimension(dim_x = 1, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 1753100759, tv_usec = 792774), type = tango._tango.CmdArgType.DevDouble, value = 0.0, w_dim_x = 1, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 1, dim_y = 0), w_value = 0.0),
DeviceAttribute(data_format = tango._tango.AttrDataFormat.FMT_UNKNOWN, dim_x = 0, dim_y = 0, has_failed = True, is_empty = True, name = 'no_value', nb_read = 0, nb_written = 0, quality = tango._tango.AttrQuality.ATTR_INVALID, r_dimension = AttributeDimension(dim_x = 0, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 0, tv_usec = 0), type = tango._tango.CmdArgType.DevVoid, value = None, w_dim_x = 0, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 0, dim_y = 0), w_value = None),
DeviceAttribute(data_format = tango._tango.AttrDataFormat.SCALAR, dim_x = 1, dim_y = 0, has_failed = False, is_empty = False, name = 'boolean_scalar', nb_read = 1, nb_written = 1, quality = tango._tango.AttrQuality.ATTR_VALID, r_dimension = AttributeDimension(dim_x = 1, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 1753100759, tv_usec = 792773), type = tango._tango.CmdArgType.DevBoolean, value = True, w_dim_x = 1, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 1, dim_y = 0), w_value = True)]

But raises an exception with pytango 10.0.2:

Traceback (most recent call last):

  File "/Users/benber/Dev/Sardana/taurus/foo.py", line 7, in <module>

    result = dp.read_attributes_reply(req_id, 0)

  File "/Users/benber/Dev/Sardana/taurus/.pixi/envs/default/lib/python3.13/site-packages/tango/green.py", line 226, in greener

    return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)

           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/benber/Dev/Sardana/taurus/.pixi/envs/default/lib/python3.13/site-packages/tango/green.py", line 116, in run

    return fn(*args, **kwargs)

  File "/Users/benber/Dev/Sardana/taurus/.pixi/envs/default/lib/python3.13/site-packages/tango/device_proxy.py", line 790, in __DeviceProxy__read_attributes_reply

    return __read_attributes_reply__(self, *args, **kwargs)

  File "/Users/benber/Dev/Sardana/taurus/.pixi/envs/default/lib/python3.13/site-packages/tango/device_proxy.py", line 730, in __read_attributes_reply__

    __check_read_attribute(attr)

    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^

  File "/Users/benber/Dev/Sardana/taurus/.pixi/envs/default/lib/python3.13/site-packages/tango/device_proxy.py", line 160, in __check_read_attribute

    raise DevFailed(*dev_attr.get_err_stack())

PyTango.DevFailed: DevFailed[

DevError[

    desc = Read value for attribute no_value has not been updated

  origin = void Tango::Device_3Impl::read_attributes_no_except(const Tango::DevVarStringArray &, Tango::AttributeIdlData &, bool, std::vector<long> &) at (/Users/runner/miniforge3/conda-bld/cpptango_1748873210561/work/src/server/device_3.cpp:991)

  reason = API_AttrValueNotSet

severity = ERR]
 
DevError[

    desc = Failed to read_attributes on device sys/tg_test/1, attribute no_value

  origin = virtual std::vector<DeviceAttribute> *Tango::DeviceProxy::read_attributes_reply(long, long) at (/Users/runner/miniforge3/conda-bld/cpptango_1748873210561/work/src/client/proxy_asyn.cpp:1509)

  reason = API_AttributeFailed

severity = ERR]

]
Assignee Loading
Time tracking Loading