Calling Variable.set in python sensitive to type of index arg

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Standard
    • Component/s: SW
    • None
    • Environment:

      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)

              Assignee:
              Ryan Herbst
              Reporter:
              Pinsonneault-Marotte, Tristan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: