from pynanovna import NanoVNAWorker
worker = NanoVNAWorker(verbose=True)
worker.set_sweep(2.9e9,3.1e9,1,101)
worker.calibrate(load_file="signal-processing/oscars_cal.cal")
data = worker.single_sweep()
worker.kill()
produces the error:
NanoVNASaverHeadless is stopping sweepworker now.
Traceback (most recent call last):
File "c:\Users\Oscar Gren\Documents\PICC\signalprocessing\record.py", line 39, in <module>
worker.kill()
File "C:\Users\Oscar Gren\AppData\Local\Programs\Python\Python312\Lib\site-packages\pynanovna\pynanovna.py", line 259, in kill
self._stop_worker()
File "C:\Users\Oscar Gren\AppData\Local\Programs\Python\Python312\Lib\site-packages\pynanovna\pynanovna.py", line 190, in _stop_worker
self.worker_thread.join()
^^^^^^^^^^^^^^^^^^
AttributeError: 'NanoVNAWorker' object has no attribute 'worker_thread'
worker.kill() produces an error.
Example
produces the error: