The error can be reproduced like so:
In [1]: import numpy as np
In [2]: import ConfigParser
In [3]: config = ConfigParser.ConfigParser()
In [4]: config.read("test.ini")
In [5]: x = np.float64(1.23)
In [6]: config.set('OMC1_T', 'temperature', x)
In [7]: config.getfloat('OMC1_T', 'temperature')
[... similar traceback ...]
TypeError: argument of type 'numpy.float64' is not iterable
The problem is that configparser is only meant for storing and retrieving strings, and the user must do the conversion explicitly (with str and getfloat). This works:
In [8]: x = np.float64(4.56)
In [9]: config.set('OMC1_T', 'temperature', str(x))
In [10]: config.getfloat('OMC1_T', 'temperature')
Out[10]: 4.56
Why we don't see this issue in any other place where we write and read parameters is that the conversion to string is likely done implicitly when saving and reopening the ini file:
In [12]: x = np.float64(7.89)
In [13]: config.set('OMC1_T', 'temperature', x)
In [14]: with open('test.ini', 'w') as cfg: # save ini file
...: config.write(cfg)
In [15]: config.getfloat('OMC1_T', 'temperature') # reading after a save gives the usual error
[... usual traceback ...]
TypeError: argument of type 'numpy.float64' is not iterable
In [16]: config.read("test.ini") # reload
In [17]: config.getfloat('OMC1_T', 'temperature') # now it works
Out[17]: 7.89
So instead of doing a config.set(str(...)) everywhere, it might be enough to add a config.read(...) at the beginning of the unlock function.