-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Standard
-
Component/s: SW
-
None
-
Environment:
This occurred when setting the value of an element of the array Variable defined here: https://github.com/slaclab/amc-carrier-core/blob/tpm/rogue6/python/AmcCarrierCore/AppHardware/RtmCryoDet/_spiMax.py . The `index` argument was passed to the `set` method from python.
Calling the `Variable.set` method with an `index` argument from python fails if the passed index value is of a type other than `int`, in this case a `np.int32`. It is easy for this to happen if e.g. the index is taken from a list stored in a numpy array, and may be difficult to debug.
The error message is:
[2025-10-30 18:28:06,050] ERROR:pyrogue.Variable.RemoteVariable.AMCc.FpgaTopLevel.AppTop.AppCore.RtmCryoDet.RtmSpiMax.TesBiasDacDataRegCh: Error setting value '0' to variable 'AMCc.FpgaTopLevel.AppTop.AppCore.RtmCryoDet.RtmSpiMax.TesBiasDacDataRegCh' with type int32(32,). Exception=Python argument types in Variable._set(RemoteVariable, numpy.int32, numpy.int32) did not match C++ signature: _set(rogue::interfaces::memory::VariableWrap {lvalue}, boost::python::api::object {lvalue}, int)