'MeasurementControl' has no '_thread_data' attribute
I'm not sure how to reproduce this error. I don't get it every time and it seems a bit random. I get it sometimes when running the MC.run_adaptive function in order to do mixer calibration.
The flow is fairly common though: instanciate measurementcontrol (with instrument monitor and plot monitor), attach settables and gettable, where the gettable is:
power = Gettable(qcodes.Parameter(name='power', label='Power', unit='dBm', get_cmd=self.sh.power))
Where self.sh.power gets the signalhound power readout via its driver.
The error traceback is:
AttributeError: 'MeasurementControl' object and its delegates have no attribute '_thread_data'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<timed exec> in <module>
g:\My Drive\Code\amazon-demonstrations\calibration_utilities.py in minimize_unwanted_sideband(self, ref_lvl, options)
227 self.mc.settables(settables)
228
--> 229 dset = self.mc.run_adaptive('minimize_sideband', af_pars)
230
231 #Get datasets
g:\my drive\code\quantify-core\quantify_core\measurement\control.py in run_adaptive(self, name, params)
321 adaptive_function(measure, **af_pars_copy)
322
--> 323 self._reset()
324 self.setpoints(
325 np.empty((64, len(self._settable_pars)))
g:\my drive\code\quantify-core\quantify_core\measurement\control.py in _reset(self)
175 self._batch_size_last = None
176 # Reset KeyboardInterrupt counter
--> 177 self._thread_data.events_num = 0
178 # Assign handler to interrupt signal
179 signal.signal(signal.SIGINT, self._interrupt_handler)
~\Anaconda3\envs\quantify\lib\site-packages\qcodes\utils\helpers.py in __getattr__(self, key)
434 raise AttributeError(
435 "'{}' object and its delegates have no attribute '{}'".format(
--> 436 self.__class__.__name__, key))
437
438 def __dir__(self) -> List[str]:
AttributeError: 'MeasurementControl' object and its delegates have no attribute '_thread_data'
If I recall correctly, when this error happens, it keeps appearing and I had to reset the notebook to make it go away.