Closed mvbnano closed 6 years ago
The difference is that ntmdt._configuration['axis_labels']
is not created on the netbook laptop.
@latchr would you have any idea as to why this is?
Work-around created on branch hack_ntmdt_stage
, and tube axes removed from qmapp_ntmdt_dev_vm.cfg
.
This is a reoccurring bug that is now effecting everything.
The netbook laptop is returning KeyError: 'device_id'
when calling
constraints = self.get_constraints()
Something is happening to cause the configuration not to load completely!
On the netbook laptop config = getConfiguration()
returns:
OrderedDict([('x',
{'channel': 0,
'label': 'x',
'pos_max': 0.0001,
'pos_min': 0.0,
'scanner': 1}),
('y',
{'channel': 1,
'label': 'y',
'pos_max': 0.0001,
'pos_min': 0.0,
'scanner': 1}),
('z',
{'channel': 2,
'label': 'z',
'pos_max': 6e-06,
'pos_min': 0.0,
'scanner': 1})])
Whereas on the anteroom PC, config = getConfiguration()
returns:
OrderedDict([('module.Class', 'motor.ntmdt_piezo_stage.PiezoStageNTMDT'),
('remoteaccess', True),
('axis_labels', ['x', 'y', 'z', 'tube_x', 'tube_y', 'tube_z']),
('x',
OrderedDict([('device_id', 1),
('channel', 0),
('constraints',
OrderedDict([('pos_min', 0.0),
('pos_max', 0.0001)]))])),
('y',
OrderedDict([('device_id', 1),
('channel', 1),
('constraints',
OrderedDict([('pos_min', 0.0),
('pos_max', 0.0001)]))])),
('z',
OrderedDict([('device_id', 1),
('channel', 2),
('constraints',
OrderedDict([('pos_min', 0.0),
('pos_max', 6e-06)]))]))])
It works now with no error given on the netbook laptop but still the KeyError
on the PC connecting to it remotely.
I don't understand what is going on, but it seems to be working for now.
One of these responses is the configuration and the other is the constraints. Regardless, I do not understand why I am getting the KeyError
.
Update this morning:
Somehow, the module loads find on the netbook laptop (still config = getConfiguration()
returns different).
The KeyError
is just occurring when the module is activated on the PC connecting to the netbook to use the stage module.
The KeyError
then reoccurs when the confocal gui is activated.
Communication with the stage appears fine, so does this even matter?
Commit 8018964a96305e9f4988de51489cb76de03467ff moved
self._configuration = self.get_constraints()
to load regardless of whether the Nova Px handshake is successful. This had no effect in resolving the KeyError
.
As a result of this error, the confocal cannot build its 'blank' xy scan area when it is activated.
Loading the confocal on the PC (that uses the remote hardware from the netbook) will trigger the KeyError
on the netbook also.
This was smartly resolved by @latchr in commit 08cd2dd04df9fbcf8eb7c4bbf71041cb8ae7015a.
This bug may be present on other dev branches!!
Therefore, this issue should stay open until they are checked.
checked and corrected all motor dev branchs. note that pi dev branch may be ready to send upstream.
On anteroom PC
ntmdt.getConfiguration()
returns:wheras on netbook laptop
ntmdt.getConfiguration()
returns: